The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
Hi,
I am a new to Power BI and I want to convert this calculation in Tableau to Power BI using DAX. Appreciate if someone can explain what this means and how can this be done.
IF First()=0 THEN WINDOW_SUM(COUNTD(ID)) END
Thank you! 🙂
Solved! Go to Solution.
IF First()=0 THEN WINDOW_SUM(COUNTD(ID)) END
Here's a step-by-step approach to translating it into DAX:
Please try this below:
This DAX formula will return the distinct count of ID only for the first row and will show blank for other rows, similar to how the Tableau calculation works.
Measure =
IF (
RANKX(ALLSELECTED(Table), [ID],, ASC, Dense) = 1,
CALCULATE(DISTINCTCOUNT(Table[ID]), ALLSELECTED(Table))
)
💌 If this helped, a Kudos 👍 or Solution mark would be great! 🎉
Cheers,
Kedar
Connect on LinkedIn
IF First()=0 THEN WINDOW_SUM(COUNTD(ID)) END
Here's a step-by-step approach to translating it into DAX:
Please try this below:
This DAX formula will return the distinct count of ID only for the first row and will show blank for other rows, similar to how the Tableau calculation works.
User | Count |
---|---|
15 | |
13 | |
8 | |
6 | |
6 |
User | Count |
---|---|
27 | |
19 | |
13 | |
9 | |
5 |