Forum Discussion
Yes/No column for rows with the same Name
Good morning everyone,
I`m having some issues trying to find the correct formula in Power BI.
I have a large database and I want to analyse the group of people who don't speak Spanish.
For that i need to create a new column in my dashboard so that if in one row “Lucas P.” speaks “Spanish”, it would appear in the column (“Speaks Spanish”) as “Yes” for every “Lucas P.” row, as you can see in the example below.
Example
Name / Language / Speaks Spanish/
Lucas P. / Spanish/ Yes
Lucas P. / French/ Yes
Lucas P. / English/ Yes
Peter M. / Russian/ No
Peter M. / English/ No
Peter M. / French/ No
Would you guys please help me out?
bust0sos , Try a new DAX column
var _cnt = countx(filter(Table, [Name] = earlier([Name]) && [Language] = "Spanish"),[Name])
return
if(isblank(_cnt), "No", "Yes")
2 Replies
- amitchandak
Super User
bust0sos , Try a new DAX column
var _cnt = countx(filter(Table, [Name] = earlier([Name]) && [Language] = "Spanish"),[Name])
return
if(isblank(_cnt), "No", "Yes")- bust0sosNew Member
Thank you very much amitchandak!!!