Forum Discussion
DATESINPERIOD not working
- 4 years ago
Hi obriaincian
Try this measure
last3Months 2 = CALCULATE ( DISTINCTCOUNT ( 'Data2'[Expiry Date] ), 'Data2'[Expiry Date] <> BLANK (), 'Data2'[Date] > EOMONTH(MAX(Data2[Date]),-3) )-1Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi v-jingzhang , Thank you for your response.
Apologies, I have now corrected the data and desired output.
Based on the sample data I'd like to filter the Date coulmn for all dates within the last 3 months (Jan, Feb, Mar) and get a distinct count of the Expiry date column (subtracted by 1, If there is only one expiry date that means no changes are made so I'd like to return zero here).
I then want to create a matrix with Products in column one and then the number of changes per product in the second column (similar to what I have in the desired outputs above)
Hi obriaincian
Try this measure
last3Months 2 =
CALCULATE (
DISTINCTCOUNT ( 'Data2'[Expiry Date] ),
'Data2'[Expiry Date] <> BLANK (),
'Data2'[Date] > EOMONTH(MAX(Data2[Date]),-3)
)-1
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.