Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Running Total line graphs are different, why?

I have to create a line graph with a running total. For this graph I am using two columns "Expense date" and "Expense Amount" in the "Expense" table. I use a measure that calculates the running total.

This is what I don't understand:

I created two graphs: one graph displays running total with a date from the date dimention table, and for the other graph I plugged in the actual date column from the "Expenses" table. Why do these two graphs look different? One is a smooth line, and the other has visible steps.

 

This is the data in the columns.

 

 

 

Top graph (screenshot below) uses this measure and the date column in "Date dimension"

 

Running per date =
CALCULATE(
    SUM(Expenses_9_16_2020[Expense  Amount]),
    FILTER(
        ALLSELECTED('Date'[Date]),
        ISONORAFTER('Date'[Date], MAX('Date'[Date]),DESC )
    )
)
 
Bottom graph uses this measure and "Expense date" from the "Expense table":
Running 3 per date =
CALCULATE(
    SUM(Expenses_9_16_2020[Expense Amount]),
    FILTER(
        ALLSELECTED(Expenses_9_16_2020[Expense Date]),
        ISONORAFTER(Expenses_9_16_2020[Expense Date], MAX(Expenses_9_16_2020[Expense Date]),DESC )
    )
)

 

2 Replies

  • Anonymous , I think it is because the date table date might not have hierarchy. and the expense date has.

    You can create another date in date table and try

     

    Date1 =date

  • @Kinga99, I think it's because the date in the date table might not have hierarchy. and the date of spending has.

    You can create another date in the date table and try

    Date1 - Date