0
votes

Scenario: I have multiple columns in a table e.g. customer ID, customer Name, City, Invoice amount, paid amount.

I want to create a slicer based on invoice amount, where I can filter the data based on invoice amount column as below: Amount 5000-200000 - Slicer Option should show text "Low" Amount 200000 - 1000000 - Slicer Option should show text "Medium" Amount 1000000 - any higher amount - Slicer Option should show "High"

I tried using Dax If ( or ( ... ) ) but it is not working. Since I am new to Power BI so don't know if I should create a measure a column or a table.

Thanks in advance

1

1 Answers

1
votes

You can create a "New Column" in the Table, using "Table tools":
enter image description here

Introduce this code:

AmountType = if(Table[Amount]>1000000,"High",if(Table[Amount]<200000,"Low","Medium"))

Then use AmountType in the slicer.

Note that if you need to exclude those with Amount < 5000 from the category "Low" you would have to add it to the if statement:

if(AND(Sheet1[Amount]<200000,Sheet1[Amount]>100000),"Medium","Low")