Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi All,
I have this logic to count only 1 for duplicate EMPLID. Right now its counting all the duplicates and the total is not correct.
In the above table, EMPLID which are highlighted needs to be counted only 1 so that the total count is 7 instead of 9. Is there a solution to get this.
Here are the DAX calculations for SM+KL Totals:
Solved! Go to Solution.
Hello @ayush_mriti
The following code should return what you need
SM+KL Distinct Total =
CALCULATE(
DISTINCTCOUNT('Employee Output final_Current'[EMPLID]),
FILTER(
'Employee Output final_Current',
'Employee Output final_Current'[ATR_Role] = "Kanban Lead(s)" ||
'Employee Output final_Current'[ATR_Role] = "Scrum Master(s)"
)
)
Hi,
Does this work?
Measure = calculate(DISTINCTCOUNTNOBLANK('Employee Output final_Current'[KL_cnt]) + DISTINCTCOUNTNOBLANK('Employee Output final_Current'[Sm_cnt]), ('Employee Output final_Current'[ATR_Role]="Kanban Lead(s)"||'Employee Output final_Current'[ATR_Role]="Scrum Master(s)"))
The solution worked, I just have to make some adjustment to the calculation. Thank you all.
Hi,
Does this work?
Measure = calculate(DISTINCTCOUNTNOBLANK('Employee Output final_Current'[KL_cnt]) + DISTINCTCOUNTNOBLANK('Employee Output final_Current'[Sm_cnt]), ('Employee Output final_Current'[ATR_Role]="Kanban Lead(s)"||'Employee Output final_Current'[ATR_Role]="Scrum Master(s)"))
its giving me the count of 14 instead of 7.
Hello @ayush_mriti
The following code should return what you need
SM+KL Distinct Total =
CALCULATE(
DISTINCTCOUNT('Employee Output final_Current'[EMPLID]),
FILTER(
'Employee Output final_Current',
'Employee Output final_Current'[ATR_Role] = "Kanban Lead(s)" ||
'Employee Output final_Current'[ATR_Role] = "Scrum Master(s)"
)
)
its giving me the count of 14 instead of 7.
User | Count |
---|---|
84 | |
76 | |
74 | |
48 | |
39 |
User | Count |
---|---|
114 | |
56 | |
51 | |
42 | |
42 |