Forum Discussion
homelander123
1 year agoHelper I
DAX Query Not working
PMPCCountNew = Var SelectedDate = SELECTEDVALUE(Query1[CSMDate]) Var PrevMonthStart = EOMONTH(SelectedDate, -2) +1 Var PrevMonthEnd = EOMONTH(SelectedDate,-1) RETURN IF( NOT ISBLANK(SelectedDate...
- 1 year ago
Hi homelander123 ,
Please find the attached pbix file for your solution.
What it does below:- use ALLEXCEPT(Query1,Query1[CSMDate]) inside CALCULATE so you keep the slicer’s filter but drop everything else
- Measure - dynamically computes the prior-month window and sums PCCount across it
Please let me know if you have further questions.
If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated, thanks!
Best Regards,
Maruthi
maruthisp
1 year agoSuper User
Hi homelander123 ,
Please find the attached pbix file for your solution.
What it does below:
- use ALLEXCEPT(Query1,Query1[CSMDate]) inside CALCULATE so you keep the slicer’s filter but drop everything else
- Measure - dynamically computes the prior-month window and sums PCCount across it
Please let me know if you have further questions.
If this reply helped solve your problem, please consider clicking "Accept as Solution" so others can benefit too. And if you found it useful, a quick "Kudos" is always appreciated, thanks!
Best Regards,
Maruthi