Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Creating a running total

I am trying to create a column that will display the running total for words. I am looking to sum the words for each vendor.

 

Example data

vendorwordsSent to Vendoranticipated delivery date
andrew35001/1/20171/15/2017
andrew25001/5/20171/30/2017
andrew10001/21/20172/1/2017
bill2001/7/20171/18/2017
bill3501/13/20171/19/2017
bill45001/19/20171/27/2017

 

I want to sum the vendor's total words when they get sent to the vendor. But when the anticipated date passes I want to subtract the total from the vendor.

 

Example with Andrew to better clarify what I am asking for help on:

 

on 1/15/2017 Andrew should have 6,000 words but on 1/16/2017 Andrew should now lose 3,500 words from his total and only have 2,500. Then when 1/21/2017 date arrives Andrew should now have 3,500 words.  

 

I am new to power bi and am not sure how this can be set up. Can someone please help me? Thank you in advance!

5 REPLIES 5
v-yuta-msft
Community Support
Community Support

Hi jarodjp42,

 

To achieve your requirement, create a calculate column using DAX below:

Column = CALCULATE(SUM(Table1[words]), FILTER(ALLEXCEPT(Table1, Table1[vendor]), Table1[Sent to Vendor] <= TODAY() && Table1[anticipated delivery date] >= TODAY()))

Capture.PNG 

 

Regards,

Jimmy Tao

Anonymous
Not applicable

@v-yuta-msft

 

Thank you for your reply. When I use the formula you provided it gives me an error saying that DAX comparison operations do not support comparing values to type text with values of type date. I went through to make sure all my date columns were data type: date and I'm still getting the error. Would the error be caused by the vendor column since it is text and there is no way to change it?

 

Thanks for your help

Hi jarodjp42,

 

Could you share your sample pbix file and clarify more details?

 

Regards,

Jimmy Tao

Greg_Deckler
Community Champion
Community Champion

Create a separate date table using CALENDAR or CALENDARAUTO and do not link it to your fact table. Use the dates from this table in your visuals. Then you will use something like MAX to create a VAR that grabs your current date. You can then use this in FILTER statements against your fact table to filter down to the correct rows that you need to sum or subtract.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

@Greg_Deckler

 

Thank you for your response. I created a date table, but am not sure how to write the proper dax syntax. Could you give me a sample dax syntax I could use?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Kudoed Authors