Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi all, I hope you can help. I have a requirement to create two columns. One column has a candidateID and the other column is clientreqno. Both columns are set as text. I want a column that will give me a count of the no of times a candidate id appears next to a requisition, and then another column that will give me the opposite for different reasons. I have looked through other solutions on the forum but nothing is giving me the right value. So as an example for CandidateID I would expect 5133447 to return a value of 2 as there are two distinct clientreqno. and then I want another column that would give me for example clientreqno of 21000044 would have returned 8
I have this, but its giving me 0 as a value. Can anyone help troubleshoot the dax:
Solved! Go to Solution.
Hi @sjhardy ,
Please try:
Distinct No each ID =
CALCULATE (
DISTINCTCOUNT ( 'Combined Candidate list'[ClientReqNo] ),
ALLEXCEPT ( 'Combined Candidate list', 'Combined Candidate list'[CandidateID] )
)
Distinct ID each No =
CALCULATE (
COUNTROWS ( 'Combined Candidate list' ),
ALLEXCEPT ( 'Combined Candidate list', 'Combined Candidate list'[ClientReqNo] )
)
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @sjhardy ,
Please try:
Distinct No each ID =
CALCULATE (
DISTINCTCOUNT ( 'Combined Candidate list'[ClientReqNo] ),
ALLEXCEPT ( 'Combined Candidate list', 'Combined Candidate list'[CandidateID] )
)
Distinct ID each No =
CALCULATE (
COUNTROWS ( 'Combined Candidate list' ),
ALLEXCEPT ( 'Combined Candidate list', 'Combined Candidate list'[ClientReqNo] )
)
Output:
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
Write these 2 calculated column formulas
=calculate(distinctcount(Data[ClientReqNo]),filter(Data,Data[CandidateID]=earlier(Data[CandidateID])))
=calculate(countrows(Data),filter(Data,Data[CandidateID]=earlier(Data[CandidateID])))
Hope this helps.
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
99 | |
99 | |
80 | |
77 | |
66 |
User | Count |
---|---|
134 | |
106 | |
104 | |
85 | |
73 |