Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi there,
I am trying to create measure for the legend for map. I read following statement to calculate the measure.
Solved! Go to Solution.
Hi @Dunner2020 ,
We can try to use the following measure to meet your reqirement:
RANGES =
SWITCH (
TRUE (),
AND (
SUM ( Sheet1[Confirmed_Cases] ) >= 0,
SUM ( Sheet1[Confimred_Cases] ) < 10
), "0 to 9",
AND (
SUM ( Sheet1[Confimred_Cases] ) >= 10,
SUM ( Sheet1[Confimred_Cases] ) < 50
), "10 to 49",
SUM ( Sheet1[Confimred_Cases] ) >= 50, "50 and more"
)
Best regards,
Can you make sure the column name doesn't have a trailing space(s)?
If you are doing a measure, you must specify the table before the column. Just putting [Confirmed Cases] in a measure it is expecting another measure being referenced. That is ok in a Calculated Column though as everything is the current table.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHi @edhans,
I have removed the sapaces from the column name and also put the table name, but no luck. Here is the updated snippet code:
Hi @Dunner2020 ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,
Hi @Dunner2020 ,
We can try to use the following measure to meet your reqirement:
RANGES =
SWITCH (
TRUE (),
AND (
SUM ( Sheet1[Confirmed_Cases] ) >= 0,
SUM ( Sheet1[Confimred_Cases] ) < 10
), "0 to 9",
AND (
SUM ( Sheet1[Confimred_Cases] ) >= 10,
SUM ( Sheet1[Confimred_Cases] ) < 50
), "10 to 49",
SUM ( Sheet1[Confimred_Cases] ) >= 50, "50 and more"
)
Best regards,
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 37 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 130 | |
| 88 | |
| 82 | |
| 68 | |
| 64 |