Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. 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 |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
8 | |
6 |