Forum Discussion
Anonymous
6 years agoNot applicable
Summarise DAX
Hi All I would like to count the number of unique projects I have with revenue and was wondering if I should use the summarise function? I was considering using DistinctCount but I beli...
- 6 years ago
v-zhenbw-msft
6 years agoCommunity Support
Hi Anonymous ,
We can create a calculate column and a measure to meet your requirement.
1. First you need to have a date column like this,
2. Then we can create a secondary column to calculate the accumulate of revenue.
Column = CALCULATE(SUM('Table'[Revenue]),FILTER(ALLSELECTED('Table'),'Table'[Date]<=EARLIER('Table'[Date])&& 'Table'[ProjectID]=EARLIER('Table'[ProjectID])))
3. At last we can create a measure to calculate the distinct count of Project ID.
Count ID = CALCULATE(DISTINCTCOUNT('Table'[ProjectID]),FILTER('Table','Table'[Column]>0))
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
BTW, pbix as attached.
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.