Forum Discussion

Kumarun's avatar
Kumarun
Icon for Helper I rankHelper I
4 years ago

Next six months

If i select month in the slicer i need to display next Six months data.

 

Like if i select March, i need to display next 6 months from March..

 

5 Replies

  • Hi,

    Please check the below picture and the attached pbix file.

    I tried to create a sample pbix file like below.

    One of ways to solve this is to create a disconnected calendar table and use a column from this table as a slicer.

     

     

    Desired outcome measure: =
    VAR mindate_selectedmonth =
        MIN ( 'Calendar Slicer Table'[Date] )
    VAR lastdate_nextsixmonths =
        EOMONTH ( mindate_selectedmonth, 5 )
    RETURN
        CALCULATE (
            SUM ( Data[Value] ),
            KEEPFILTERS (
                DATESBETWEEN ( 'Calendar'[Date], mindate_selectedmonth, lastdate_nextsixmonths )
            )
        )
    

     

  • v-yalanwu-msft's avatar
    v-yalanwu-msft
    Icon for Community Support rankCommunity Support

    Hi, Kumarun ;

    Jihwan_Kim's scheme is correct. If you want to find the value six months after the date selected by the slicer, you have to use another unrelated table as the slicer and create a measure. Just saw that you mentioned incorrectness in your data, can you provide your scenario and the results you want to output?


    Best Regards,
    Community Support Team _ Yalan Wu
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.