Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

Last n months using drillthrough

Hi All,
I have a source page where i have a date slicer which shows the end of each month.
I have a matrix where i am having different categories and a measure which represents the value for the month that is selected in the slicer. I want to use the drillthrough function in the matrix table where i want to show the last n months value for the date which is selected in the source page.
Suppose i select march 2020 in the source page,i want to see the last 6 months in the target page when i use the drillthrough functionality.
Could anyone please suggest me any feasible solution

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,
        I was also stucked in the same problem but this video helps me. 
    Link: https://www.youtube.com/watch?v=duMSovyosXE
    I hope this will help you too.

    Thanks

    If this helps and resolves the issue, appreciate a Kudos and mark it as a Solution! 🙂

  • Anonymous , if You are using a before slicer this one will work.

     

    Measure =
    var _max = maxx(allselected('Date'),'Date'[Date])
    var _min = date(year(_max),month(_max)-6,1)
    return
    calculate([measure],filter(All(DATE), Date[Date] >=_min && Date[Date] <=_max))

    or
    Measure =
    var _max = maxx(allselected('Date'),'Date'[Date])
    var _min = date(year(_max),month(_max)-6,day(_max))
    return
    calculate([measure],filter(All(DATE), Date[Date] >=_min && Date[Date] <=_max))

     

    Or use this solution: https://www.youtube.com/watch?v=duMSovyosXE

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi Amit,

      Thanks for your quick response but unfortumately the measure which is supposed to be shown in the target page is a precomputed once where it has other if else statements grouped by other dimensions the same methodology is not working.

      It would be great if you can suggest me any other alternative