Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

How to showcase the report based on a date selection before or after ?

I have an effective date, an expression date, and a date picker to help me choose a date. If we choose a date from the date picker, the following condition should be met on the report. Effective dat...
  • amitchandak's avatar
    4 years ago

    Anonymous , Prefer an independent table for slicer

     

    before

    //Date1 is independent Date table, Date is joined with Table
    new measure =
    var _max = maxx(allselected(Date1),Date1[Date])
    return
    calculate( sum(Table[Value]), filter('Date', 'Date'[Date] <_max))

     

    after

    //Date1 is independent Date table, Date is joined with Table
    new measure =
    var _max = maxx(allselected(Date1),Date1[Date])
    return
    calculate( sum(Table[Value]), filter('Date', 'Date'[Date] > _max))

     

    if do not create independent table data will rollup one date

     

    example

    before =
    var _max = maxx(allselected(Date),Date[Date])
    return
    calculate( sum(Table[Value]), filter('Date', 'Date'[Date] <_max))

     

    Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI