Forum Discussion

homelander123's avatar
1 year ago
Solved

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...
  • maruthisp's avatar
    1 year ago

    Hi homelander123 ,

    Please find the attached pbix file for your solution.
    What it does below:

    1. use ALLEXCEPT(Query1,Query1[CSMDate]) inside CALCULATE so you keep the slicer’s filter but drop everything else
    2. Measure - dynamically computes the prior-month window and sums PCCount across it

    CSMDate and ICM Date.pbix

    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 

    LinkedIn - http://www.linkedin.com/in/maruthi-siva-prasad/ 

    X            -  Maruthi Siva Prasad - (@MaruthiSP) / X