Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
dp24
New Member

Method to use measure as legend?

Hi all,

 

Happy to share a workbook if necessary, after masking my data, but I think the question probably applies generally.

 

In short, I have a table with a list of items each with a start and end date, and I want to compare them against a date provided from a slicer on the report, and use a formula to assign a status based on the date comparison (‘not started’, ‘in progress’, ‘complete’). I have a separate table with dates which feeds a slicer, and a measure (using SELECTEDVALUE) reading the chosen date.

 

I’ve created a SWITCH measure which compares the SELECTEDVALUE measure against the start or end date of each item. This works fine in a table, and shows the correct status based upon the selected date.

 

However, I want to use this as a legend (specifically on a map, in this case) which is obviously a problem as ‘Legend’ will only allow a column reference.

 

Does anyone have a potential workaround which would effectively allow the measure result to be converted to a column and therefore enable it to be used as a legend?

 

Thanks in advance!

2 REPLIES 2
Anonymous
Not applicable

Hi @dp24 ,

Nope, I don't think it is possible. Current power bi not allow you to use measure on axis and legend fields, you can consider to submit/vote idea for this requirement.

Regards,

Xiaoxin Sheng

Thanks @Anonymous

 

I appreciate the limitation of not being able to use the measure directly as a legend, really just wondering if anyone has a clever workaround in DAX before I have to come up with a solution in the source data (which could be a problem due to the size of the dataset)

 

Thanks

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.