Forum Discussion

AnGorSan's avatar
AnGorSan
Frequent Visitor
8 years ago

Issue with visual level filters and ParallelPeriod Function (MDX)

Hello Comunity,

 

We use live connection to MOLAP Cube, and have the strange issue with visual level filters and previous periods based data.

In the cube the measure is defined as

CREATE MEMBER CURRENTCUBE.[Measures].[MyMeasurePM]
 AS ([Measures].[MyMeasure],
    ParallelPeriod(
        [Period Date].[Year-Month-Date].[Cal Year Month],1,
        [Period Date].[Year-Month-Date].CurrentMember))

 

We also have the delta measure defined as MyDelta = [MyMeasure]-[MyMeasurePM].

We also have the flag in our Date dimension that indicates the month is one of the last twelve month.

When doing a simple test - selecting calendar months, and all three meaures, all the data is shown correctly.

However, when applying the VISUAL filter IsLastTwelveMonth=1, the first month MyMeasurePM value is blank,

and therefore the MyDelta is equal to MyMeasure value.

So it looks like the the filter is applied not to the visual, but to the DATASET!

Why?! Should't the VISUAL filter have no effect on the source data?

 

I am, of course, aware how to go around this by extending the period or using the relative date filtering, but these are workarounds, not the correct behaviour!

 

Is this a bug in PowerBI or an expected behaviour?!

6 Replies

    • AnGorSan's avatar
      AnGorSan
      Frequent Visitor

      Hi Angela.

       

      Thank you for your reply. However, it makes no sense in regards to the question because:

      1 - We do not import data, we use LIVE connection

      2 - We do not filter the visual by its measures, we use date dimension attribute as a filter.

       

      The issue here is that the Power BI visuals seem to filter the datasets underneath them, and then do the display/calculations.

      However, the calculations should be performed PRIOR to VISUAL filter application!

       

      My question is - why is it implemented in a way the PARALLELPERIOD functions become 50% useless ???

       

      • v-huizhn-msft's avatar
        v-huizhn-msft
        Microsoft Employee

        Hi AnGorSan,

        When you use Direct Query, Power BI Desktop queries the underlying data source, which means you’re always viewing current data. You said "the Power BI visuals seem to filter the datasets underneath them", in your dataset, the data is not filtered?

         

        Thanks,
        Angelia