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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
shoeb1359
Helper II
Helper II

Create a flag for each id having duplicate values using Dax

Hello Experts,

I have stucked in a scenario where i need to create a language flag for each id using dax

Thanks in advance

 

IDLanguageLanguage Flag  (Output)
1EnglishBilingual
1ArabicBilingual
2 NA
3Englishmonolingual
4Arabicmonolingual
5ArabicBilingual
5EnglishBilingual
1 ACCEPTED SOLUTION
ryan_mayu
Super User
Super User

@shoeb1359 

you can try this

 

Column =
var _count=CALCULATE(DISTINCTCOUNT('Table'[Language]),ALLEXCEPT('Table','Table'[ID]))
return if(_count=1 && 'Table'[Language]="","NA",if(_count=1,"monolingual","Bilingual"))
11.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
FlipFlop1
Advocate I
Advocate I

FlipFlop1_0-1725975475646.png

 

DAX:

Language Flag =
        VAR LanguageCount = CALCULATE(COUNT(Table1[ID]),ALLEXCEPT('Table1',Table1[ID]))
        RETURN
        IF(Table1[Language]=BLANK(), "NA",
        IF(LanguageCount=1, "Monolingual",
        IF(LanguageCount=2, "Bilingual")))
ryan_mayu
Super User
Super User

@shoeb1359 

you can try this

 

Column =
var _count=CALCULATE(DISTINCTCOUNT('Table'[Language]),ALLEXCEPT('Table','Table'[ID]))
return if(_count=1 && 'Table'[Language]="","NA",if(_count=1,"monolingual","Bilingual"))
11.PNG




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.