Forum Discussion
Problems creating a specific measure
- 5 years ago
Hi Anonymous
What you need is a Sumx of the Distinct count, forgive the bad measure name
sumx distinct count = SUMX(VALUES('Table'[FactTaskExecution_id]), [Distinct Batch Count])Again pbix sample attached
Hi Anonymous,
Making some assumptions on the Visual requirement, the following measure provides the distinct count of Batches
Distinct Batch Count = DISTINCTCOUNT('Table'[BatchNumber])
Resulting in the following visual
Attached please find a simple sample file
Thanks,
Thanks, it's almost there. I just need to group by the FactTaskExecution_id becaus if batchnumber = 1 in two different FactTaskExecution_id it should count as well if you know what I mean.
Thank you.
Rui
- richbenmintz5 years agoResident Rockstar
Hi Anonymous
What you need is a Sumx of the Distinct count, forgive the bad measure name
sumx distinct count = SUMX(VALUES('Table'[FactTaskExecution_id]), [Distinct Batch Count])Again pbix sample attached
- Anonymous5 years agoNot applicable
Hi richbenmintz
You're legend. Thanks for the solution. I was not getting there for nothing. Need to start thinking when I need 2 measures or something. I'm trying to create always one.
Thank you very much.
Have a nice day.
Rui
- richbenmintz5 years agoResident Rockstar
Hi Anonymous,
You are most welcome, I would imagine you could get the same result using a single measure and storing the intitial distinct count in a variable.
Thanks,