Reputation: 1
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), DimDate(Date)). it gives the same result in every row when use the fields from DimDate table and also fills the empty rows with same results. Your help will be highly appreciated.
Upvotes: 0
Views: 527
Reputation: 3741
Depending on what do you really need you should change your measure by manipulating a filter context. First use a CALCULATE, SECOND add a good filter statement. For example:
YTD = calculate (sum(FactTable[sales]), FILTER(ALL(DimDate), DimDate[Year] = SELECTEDVALUE(DimDate[Year]) && DimDate[Date] <= SELECTEDVALUE(DimDate[Date] ) )
If i put DimDate[Date] to visualization and this measure then i get a realy nice output.
Upvotes: 0