I have a map visual in Power BI having a 3 level drilldown
. State --> Station -->Meter ID.
The map essentially shows malfunctioning meters.
The below is my map table structure :
The Legend categories are '<0.1% Malfunctioning' and '>=0.1% Malfunctioning". So the Legend has to be caluclated dynamically based on drill down level and also based on the filters applied.
State,Station,Date,Billing-cycle,Meter-status,Manufacturer are user select tab filters.
Legend Table : (Legend column would go into Legend field for the map)
I'm trying to use the disconnected table approach and the summarize statement, but I'm kind of stuck on what I should be returning after summarizing. Partial DAX
measure below:
MissingreadsBucket =
var Summary = SUMMARIZE(MM_LocationData,MM_LocationData[ID],
"Bucket",
iF(
COUNTROWS(MM_LocationData)/CALCULATE(COUNTROWS(MM_LocationData),ALL(MM_LocationData[IsMeterMissingRead])) > 0.001,
">=0.1% Malfunctioning","<0.1% Malfunctioning")
Please Help . Thank You.
Answering this Question myself as a work around was found.
If we are willing to let go of the ability to click on the legend , We can format the icon color of the map by using the conditional formatting option shown below.
For the legend, We will have to make do with an image or formatted table as shown below: