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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
shoeb1359
Helper I
Helper I

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
Sept PBI Carousel

Power BI Monthly Update - September 2024

Check out the September 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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