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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

calculate Running Total

i have data like below with duplicate values in the avg column and  from the date i need month year as x-axis for the line chart.

i need to show the running total of the avg in line chart   removing that duplicates  values.

 

sambhu_0-1618921533918.png

 

3 ACCEPTED SOLUTIONS
Anonymous
Not applicable

@selimovd 

Thanks Getting the average correctly . is this measure can be used for creating the running total .

 

View solution in original post

Hey @Anonymous ,

 

OK, so you want the running total over the column average. That's different to the running average.

What should happen on Januar 17?

Is January 2017 = 255+1789+247 + 1789 + 45

Or is January 2017 = 45

 

That was my question in the post before.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

View solution in original post

Hey @Anonymous ,

 

here you go:

Average = 
VAR vMinDate = FIRSTDATE(ALL('myTable'[Date]))
VAR vMaxDate = LASTDATE('myTable'[Date])
VAR vFilteredTable = FILTER(ALL('myTable'), 'myTable'[Date] >= vMinDate && 'myTable'[Date] <= vMaxDate)
VAR vSummarizeTable = SUMMARIZE(vFilteredTable,'myTable'[Date], 'myTable'[Avg])
RETURN
SUMX(vSummarizeTable, 'myTable'[Avg])

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

 

View solution in original post

8 REPLIES 8
selimovd
Super User
Super User

Hey @Anonymous ,

 

you can get the correct average by removing the duplicates for your calculation.

Try the following measure:

Average = 
VAR vSummarizeTable = SUMMARIZE('myTable','myTable'[Date], 'myTable'[Avg])
RETURN
AVERAGEX(vSummarizeTable, 'myTable'[Avg])

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 
Anonymous
Not applicable

@selimovd 

Thanks Getting the average correctly . is this measure can be used for creating the running total .

 

Hey @Anonymous ,

 

you mean the running average?

Do you want to calculate the average from the beginning of the year to the day specified or from the beginning of all data up to the day specified?

 

For that you have to modify it a little, but I can do that if you tell me which of the two above you need.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 
Anonymous
Not applicable

@selimovd 

Expected Result

sambhu_0-1618932868922.png

Running average 

Hi,

Share the link from where i can download your PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hey @Anonymous ,

 

OK, so you want the running total over the column average. That's different to the running average.

What should happen on Januar 17?

Is January 2017 = 255+1789+247 + 1789 + 45

Or is January 2017 = 45

 

That was my question in the post before.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 
Anonymous
Not applicable

@selimovd 

 January 2017 = 255+1789+247 + 1789 + 45

 

Hey @Anonymous ,

 

here you go:

Average = 
VAR vMinDate = FIRSTDATE(ALL('myTable'[Date]))
VAR vMaxDate = LASTDATE('myTable'[Date])
VAR vFilteredTable = FILTER(ALL('myTable'), 'myTable'[Date] >= vMinDate && 'myTable'[Date] <= vMaxDate)
VAR vSummarizeTable = SUMMARIZE(vFilteredTable,'myTable'[Date], 'myTable'[Avg])
RETURN
SUMX(vSummarizeTable, 'myTable'[Avg])

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍
 
Best regards
Denis
 

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.