Forum Discussion

Asantos2020's avatar
Asantos2020
Advocate II
7 years ago

Running total from multiple tables

Hello guys,

 

I have the following DAX which works, giving me the running sales total plotted on a line chart whose Date axis if from Calendar table, but I can't figure out a way to get it working when the field is from a different table, hence Total from Sales F'Cast Table.

 

I'm almost certain the issue lies on date relationship among the tables, but I can't solve it...

 

Sales Table

Customer ID     Date   Total

Total Cumulativo = CALCULATE(SUM(Sales Table[Total]);DATESYTD('Calendário'[Date]))

<---Relationship duly established --->

Calendar Table

Date

 

Sales F'cast Table (Relationship established with Sales Table on a Customer ID basis)

Customer ID   Date   Total

Sales F'cast Table = CALCULATE(SUM(Sales F'cast Table[Totalt]);Sales Table[Date])

Fake data below for testing purposes, but it shows that the forecast sales is not accumulating overtime.

 

 

I will filter it later by Customer, Product, Customer category, etc - all columns already in the Sales Table, but not in the Forecast Table.

 

I appreciate your attention/help!

 

Cheers,

Antonio

1 Reply

  • v-cherch-msft's avatar
    v-cherch-msft
    Microsoft Employee

    Hi Asantos2020 

    Could you share your assumed sample data which could reproduce your scenario and your desired output?Please explain more about your expected output.You can upload the .pbix file to OneDrive and post the link here. Do mask sensitive data before uploading.

    Regards,