Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I have created a calculated column:
hi @Anonymous - you can try with the below formula
Proud to be a Super User!
While the code based approach using complex nested IF statements will work, I usually prefer a DATA based approach:
1) Create a small table (maybe use ENTER DATA) that contains the following: Sort Order (INT), Low Range, High Range, Description.
2) Add data as needed: 1 , 0, 0.06, "0% - 6.00%", etc.
3) Set the Sort By of Descripiton to the Sort Order column.
4) Hide the table. It needs no relationships.
5) Add a column with a formual like this:
Category Sales Bin = CALCULATE ( VALUES ( 'Lookup Table'[Description]),
FILTER ( 'Lookup Table',
'Lookup Table'[Low Range] <= 'Main Table'[Sales%]
&&
'Lookup Table'[High Range] >= 'Main Table'[Sales%]
)
)
Now you have a solution that is DATA driven. Put that table in an EXTERNAL source like a CSV, Excel, or database table and you can change the bins by changing the DATA, not having to touch the CODE.
Proud to be a Super User! | |
Ah, because you need it to be a MEASURE, not a COLUMN.
From what I see, every sale in Product Sub Category of Appliances has a Category Sales Bin of "0% - 6.00%" so your table is doing a GROUP BY of that text value.
Proud to be a Super User! | |
Because in the first line: 6.00 is just that. Six. It is NOT six PERCENT. You need 0.06.
Proud to be a Super User! | |
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
97 | |
80 | |
67 | |
63 |
User | Count |
---|---|
147 | |
110 | |
108 | |
85 | |
64 |