Forum Discussion
samsa18
3 years agoFrequent Visitor
How to use conditionals on filter expression?
Hi all, I'm trying to count the unique ids based on the 90 day amount. However, one problem I ran to is that it would count the 120 day amount, which is not what I want and highlighted in blue...
- 3 years ago
Hi,
Try this
=calculate(distinctcount('PSJH DQ 9-13-2022'[ID]),'PSJH DQ 9-13-2022'[Day 90 Amount]>0&&'PSJH DQ 9-13-2022'[Day 120 Amount]=0)
Ashish_Mathur
3 years agoSuper User
Hi,
If Day 90 amonut is already a measure that you have written, then write this measure
Distinct count = countrows(filter(values('PSJH DQ 9-13-2022'[ID]),[Day 90 Amount]>0))
Hope this helps.
samsa18
3 years agoFrequent Visitor
Hi Ashish,
It's not a measure. It's part of the data source.
- Ashish_Mathur3 years agoSuper User
Hi,
Try this
=calculate(distinctcount('PSJH DQ 9-13-2022'[ID]),'PSJH DQ 9-13-2022'[Day 90 Amount]>0&&'PSJH DQ 9-13-2022'[Day 120 Amount]=0)