Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Getting the same results in every row while calculating TotalYTD

I am getting the same results in every row while calculating the TotalYTD in powerBI. I have a fact table and dimensional date table. My DAX formula is very simple as TotalYTD(sum(FactTable(sales), D...
  • VahidDM's avatar
    VahidDM
    5 years ago

    Hi Anonymous 

     

    Try this measure:

    Measure YTD = 
    CALCULATE (
        SUM ( Actuals[Actual] ),
        FILTER (
            ALL ( DateTable ),
            DateTable[DayOfWeek] <= MAX ( DateTable[DayOfWeek] )
        )
    )
    

     

    Output:

     

    Link to download updated file: https://gofile.io/d/ClzBtt

     

    Did I answer your question? Mark my post as a solution!

    Appreciate your Kudos  !!