cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dp24 Frequent Visitor
Frequent Visitor

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
Community Support Team
Community Support Team

Re: Method to use measure as legend?

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

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.



For learning resources/Release notes, please visit: | |
dp24 Frequent Visitor
Frequent Visitor

Re: Method to use measure as legend?

Thanks @v-shex-msft

 

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