Forum Discussion

harshagraj's avatar
harshagraj
Post Partisan
6 years ago

To switch between months

Hi all, Please help me to the achieve the below. I have to use slicer(Report Date). I have measures as Tools, Projects etc.
In Slicer if i select Jan it should filter Jan and show in 1st view and  in the same slicer if i select Feb it should show Feb. Basically need to compare two months one below other.Thanks in advance

 

5 Replies

    • harshagraj's avatar
      harshagraj
      Post Partisan

      Hi parry2k thank you for looking into this. Sorry for not giving clear idea. The Table is history table it has Date column called History Date. In the same table We have Tool Number, Project Number etc column also. I have to use History Date[Month] in Slicer. I need two views one below the other. Its a single selection. If in slicer 1 i select Jan the bar chart displays the data with all year Month Eg Jan 18, Jan 19, Jan 20 etc . In Slicer 2 if u select Feb it will show Feb 18, Feb 19, Feb 20.

  • harshagraj , Not very clear. The only thing I can suggest is to take min value as a filter in one measure and max value as a filter in another measure. But there are a lot of ifs buts

     

    Measure 1=
    var _min = minx(Table,Table[Month])
    return
    calculate(Table[Value],filter(Table,Table[Month]=_min))

    Measure 2 =
    var _max = maxx(Table,Table[Month])
    return
    calculate(Table[Value],filter(all(Table),Table[Month]=_max))

  • v-xicai's avatar
    v-xicai
    Community Support

    Hi  harshagraj  ,

     

    Does that make sense? If so, kindly mark the proper reply as a solution to help others having the similar issue and close the case. If not, let me know and I'll try to help you further.

     

    Best regards

    Amy