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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hello folks!
A very very niche issue for you. I have a data table like below.
Region | Local authority | Company Name |
London | Lambeth | A |
South West | Devon | B |
South West | Devon | C |
South West | Cornwall | D |
South West | Cornwall | E |
South East | Guildford | F |
South East | Chichester | G |
North East | Middlesbrough | H |
So we have a repeated index for region and local authority for each unique company. In Icon Map I then have 3 unique layers; two geojsons and a circle layer for company lat/long (not included in the table above). I have been able to create a label measure that allows me to swap between labels as you drill down layers from Region > Local Authority > Company Name. The code of the label function is below.
Label = SWITCH (TRUE, ISINSCOPE(Partner_Data[combi_lat_long]), MAX(Partner_Data[Company name]), ISINSCOPE(Partner_Data[Local authority]), MAX(Partner_Data[Local authority]), ISINSCOPE(Partner_Data[Region]), MAX(Partner_Data[Region]), "unknown")
The layers correspond to different geojson layers:
And this works well! So no issues there. The problem is then if you add a slicer. As soon as you then filter an item the labels may swap positions. London moving to Cornwall, and Liverpool to Manchester. I have no idea what is causing this other than the 'MAX()' function above. I assume as we filter other variables in the table the logic it is not finding a unique label and doing weird and whack things behind the scenes I cannot see.
If I create a table and test the slicer, everything is coming out consistent, but as soon as its in Icon Map it does this weird swapping, which also happens at all levels.
Anyone have this issue or an idea as to how to fix my label logic to make it consistent at any given level?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.