Forum Discussion

Pablos_007's avatar
Pablos_007
Regular Visitor
3 years ago
Solved

Last Week Turnover Filter Help Needed please

Trying to use DAX in Microsoft Excel - Help sought please 😉   I created a measure named [Total Turnover 2023]  (=CALCULATE(SUM(ASC_TBI_TBL[Turnover]),ALL(ASC_TBI_TBL[FY]),ASC_TBI_TBL[FY]="2023") ...
  • rautaniket0077's avatar
    3 years ago

    Try using below measure

    LW_Turnover_2023 =
    var a = SELECTEDVALUE('Qry_Accounting Periods'[_Week])
    var b =
    CALCULATE(
          (SUM(ASC_TBI_TBL[Turnover]),
            'Qry_Accounting Periods'[_Week] = a-1
    )
    return b

    use one slicer for week and another for year (2023)

    as you can see in the below screenshot i have selected year = 2015 and week = 8.


     

    dont use this below measure
    (=CALCULATE(SUM(ASC_TBI_TBL[Turnover]),ALL(ASC_TBI_TBL[FY]),ASC_TBI_TBL[FY]="2023")

    if it solves your issue please accept my answer as solution.