Forum Discussion

monika_eliza's avatar
monika_eliza
Frequent Visitor
3 years ago
Solved

Problem with choosing noncontiguous dates

Hello,   I have a problem with using a date slicer: when I am choosing multiple dates which are noncontiguous (e.g. March and May instead of March, April and May) my matrix visual crashes.   In m...
  • monika_eliza's avatar
    3 years ago

    To anyone who would have the same problem in the future, I found a solution.

     

    Instead of:

    Sales Sameperiodlastyear m. = CALCULATE((SUM(PowerBI_input[Sales])), SAMEPERIODLASTYEAR(('Calendar'[Date])))

     

    use:

    Sales YA = CALCULATE(SUM(PowerBI_input[Sales]), PARALLELPERIOD('Calendar'[Date], -12, MONTH))