Forum Discussion
Pulling out distinct values based on multiple criteria
Hello Everyone,
Please i need some helping writing some dax function to pull distinct values from a live data feed and based on multiple criteria into a new table. There is a lot of duplicate data that needs to be filtered out. Its a training attendance form and customers are required to undergo just one training on a particular topic per quarter. But we are having customers being recorded multiple times for the same training within the same quarter.
5 Replies
- v-juanli-msftCommunity Support
Hi hajoo125
Create a measure
Measure = CALCULATE(DISTINCTCOUNT('430'[customers]),ALLEXCEPT('430','430'[quarter],'430'[training]))Add columns and measures in a matrix visual, you could also expand down all level
Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.- hajoo125Frequent Visitor
Hi Maggie,
Thanks for trying to help out. I still haven't gotten this right, can you give me direct syntax for this? What does '430' in your formula mean? See below a snapshot of my report headers in power bi desktop.
So i need to extract unique participants id within each quarter on a given set of training modules.
Thematic principale = training module
- v-juanli-msftCommunity Support
Hi hajoo125
"430" is my table name.
if 'table name'[year],'table name'[quarter] are columns, try measure below
Measure = CALCULATE(DISTINCTCOUNT('table name'[participants id]),ALLEXCEPT('table name','table name'[year],'table name'[quarter],'table name'[Thematic principale]))Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.