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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
RossS
Frequent Visitor

Trying to create a comparison of the running total of last year

I have a running total for the current month. I am trying to create a running total for this month last year, then compare it with the current month's running total.

 

For this month's running total I have the following:

 

Running Total = CALCULATE(SUM(Sales[Sales Amount Actual]),
FILTER(ALLSELECTED(Sales),
Sales[Sales Amount Actual] <=MAX(Sales[Posting Date])),
MONTH(Sales[Posting Date]) = MONTH(TODAY()),
YEAR(Sales[Posting Date]) = YEAR(TODAY()))

 

The comparrison won't be for this date (i.e. it is the 15th of the month today, but it won't neccesarily be the 15th of this month last year). The comparrison will be for the working day (i.e. today is the 11th working day of the month and this needs to be compared with the 11th working day of this month last year).

6 REPLIES 6
v-tsaipranay
Community Support
Community Support

Hi @RossS ,

 

We haven’t received an update from you in some time. Could you please let us know if the issue has been resolved?
If you still require support, please let us know, we are happy to assist you.

 

Thank you.

v-tsaipranay
Community Support
Community Support

Hi @RossS ,

 

It's been a while since we last heard from you. We are ready to assist you with resolving the issue, but we need the necessary details from you. Kindly share the information required so we can better understand and address your issue.

 

Thank you.

v-tsaipranay
Community Support
Community Support

Hi @RossS ,

 

We haven't heard from you in a while. We're ready to help resolve your issue, but we need more details from you. Please provide the necessary information so we can better assist you.

 

Thank you.

govind_021
Super User
Super User

Hi @RossS 
Could you please share the structure of your data model and a screenshot of the visual where you're displaying the running total comparison?

v-pagayam-msft
Community Support
Community Support

Hi @RossS ,
Thank you for the prompt response @FBergamaschi !
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Please show the expected outcome based on the sample data you provided.
How to provide sample data in the Power BI Forum - Microsoft Fabric Community
Hope this helps !
Thank you.

Regards,
Pallavi.

FBergamaschi
Solution Sage
Solution Sage

A first note, your DAX code looks complex and dangerous (are you sure you need ALLSELECTED? For what purpose?)

 

That said, to help you, I need

1 - to know how do you define a day to be working or not

2 - to see some data for two years and your data model (I do not see in the DAX code the Calendar table and this is surely needed)

 

Please include, in a usable format, not an image, a small set of rows for each of the tables involved in your request and show the data model in a picture, so that we can import the tables in Power BI and reproduce the data model. The subset of rows you provide, even is just a subset of the original tables, must cover your issue or question completely. Do not include sensitive information and do not include anything that is unrelated to the issue or question. Please show the expected outcome based on the sample data you provided and make sure, in case you show a Power BI visual, to clarify the columns used in the grouping sections of the visual.

 

Need help uploading data? click here

 

Want faster answers? click here

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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