Forum Discussion

richard_jackson's avatar
richard_jackson
Frequent Visitor
3 years ago
Solved

One filter for Week and Past Four Weeks

Hi there!   I have a Finance dashboard and have been asked to add a weekly filter. This filter must be used to reduce certain charts to using that week only, and other charts to be using data from ...
  • richard_jackson's avatar
    3 years ago

    This has now been resolved without using independent date tables:

     

    NewMeasure_FourWeekValues = 
        var _max = MAXX(ALLSELECTED('DateTable'),'DateTable'[Week])
        var _min = _max - 3
    RETURN
        CALCULATE(SUM(ValueTable[Value]),FILTER(ALL('DateTable'), 'DateTable'[Week] >= _min && 'DateTable'[Week] <= _max))

     

     

     Thanks for the direction amitchandak & Anonymous !


    Rich