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
Nabil20_24
Helper I
Helper I

Island Table

Hi All, 

 

I have the table below as well as other tables, the relationship between this table and the other tables is 1 to *; I created calculated coulmn in the below table and called maskedcountryname which shows Country 1 to 4 and then I created an island table which contains one column and two rows masked / unmasked. so what I am trying to do is that create a table visual which show either the name of the country or just the masked name as well as some columns pulled from the below table, measures created, and other columns from different table;  
this is my code but its not woking as when I change the option from the slicer the name of the country does not change 

MaskTable = DATATABLE(
    "Mask", STRING,
    {
        {"Masked"},
        {"Unmasked"}
    }
)
DisplayedName =
IF(
    SELECTEDVALUE(MaskTable[Mask], "Masked") = "Unmasked",
    'Data '[Country Name ],
    'Data '[MaskedName]
)


anyone cna tell me why this is not working the slicer seems to return what has been selected but the table I created does not change at all.

Country Name Total Sales Forecasted Revenue Budget 
England 10010005000500
France 20035003400600
Germany 30044001200800
Spain 40076006230900



1 ACCEPTED SOLUTION
muhammad_786_1
Solution Supplier
Solution Supplier

Hi @Nabil20_24 

 

I just created a DisplayedName measure instead of a calculated column and it worked perfectly.

 

muhammad_786_1_0-1725030985660.png

 

I've also attached a link to a reference file. You can check it out as well.

 

File


Best Regards,
Muhammad Yousaf

 

If this post helps, then please consider "Accept it as the solution" to help the other members find it more quickly.

 

LinkedIn

 

View solution in original post

3 REPLIES 3
muhammad_786_1
Solution Supplier
Solution Supplier

Hi @Nabil20_24 

 

I just created a DisplayedName measure instead of a calculated column and it worked perfectly.

 

muhammad_786_1_0-1725030985660.png

 

I've also attached a link to a reference file. You can check it out as well.

 

File


Best Regards,
Muhammad Yousaf

 

If this post helps, then please consider "Accept it as the solution" to help the other members find it more quickly.

 

LinkedIn

 

Sahir_Maharaj
Super User
Super User

Hello @Nabil20_24,

 

Can you please try this revised version:

DisplayedName = 
IF(
    SELECTEDVALUE(MaskTable[Mask], "Masked") = "Unmasked",
    MAX('Data'[Country Name]),
    MAX('Data'[MaskedName])
)

Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ About: https://sahirmaharaj.com/about.html
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Hi Sahir, 

 

Thanks for this. Actually max will return one row only 

 

 

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.