Forum Discussion
Convert Tableau calculation to Power BI
1. COUNTD(if UPPER([ TYPE 1 ])='MAJOR' THEN [NAMES]END)
2. RANK_UNIQUE(COUNTD([TYPE 1]))
How to conver this tableau functions into Power BI dax ?
Anonymous , Sorry double quote. try search
countx(filter( table, search("MAJOR",Table[ TYPE 1 ],,0) >0) , Table[Name])
or
countx(filter( table, UPPER(Table[ TYPE 1 ])='MAJOR'), Table[Name])
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
3 Replies
- amitchandakSuper User
Anonymous ,
countx(filter( table, UPPER(Table[ TYPE 1 ])='MAJOR'), Table[Name])
or
countax(filter( table, UPPER(Table[ TYPE 1 ])='MAJOR'), Table[Name])2. RANK_UNIQUE(COUNTD([TYPE 1])) -- there is no unique rank
Rank Tie breaker
https://community.powerbi.com/t5/Community-Blog/Breaking-Ties-in-Rankings-with-RANKX-Using-Multiple-Columns/ba-p/918655
https://databear.com/how-to-use-the-dax-rankx-function-in-power-bi/- AnonymousNot applicable
I have tried the first function, it is not giving me result, it only give me a blank values .
- amitchandakSuper User
Anonymous , Sorry double quote. try search
countx(filter( table, search("MAJOR",Table[ TYPE 1 ],,0) >0) , Table[Name])
or
countx(filter( table, UPPER(Table[ TYPE 1 ])='MAJOR'), Table[Name])
If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.