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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
chrisgehm
Helper III
Helper III

Show acumulated values

Hi!

I've got the following table in excel:

 

1.PNG

 

What I need to do is to show in a line chart graph the 3 amounts.

But the first must be accumulated, for example:

 

In month 1 I've got 54 (4+46+4)

In month 2 Iv'e got 91 (1+89+1) but in the chart month 2 must have the value of month 1 + month 2 : 54+91=145. And so on, in Month 3 = month 2 + month 3

Month 4 = month 3 + month 4

 

etc..

 

Is it possible?


Do I have to do something in the excel file or directly in power bi?

 

Kind regards

1 ACCEPTED SOLUTION
magsod
Solution Supplier
Solution Supplier

Hi,

 

One way to do this would be to create three separate measures in Power BI with the following code:

Measure1=Calculate(Sum('TableName'[Amount1]);
                                  Filter(All('TableName'[Month]);
                                           'TableName'[Month]<=MAX('TableName'[Month])
                                   )
                        )

 

Substitute 'TableName' with the name that your table has when imported into Power BI.

Then Measure2, Measure3 similar but use columns Amount2, 3...

 

Create the visual by adding a line chart and put Month on Axis and the three measures in Values.

 

Br,

Magnus

View solution in original post

2 REPLIES 2
magsod
Solution Supplier
Solution Supplier

Hi,

 

One way to do this would be to create three separate measures in Power BI with the following code:

Measure1=Calculate(Sum('TableName'[Amount1]);
                                  Filter(All('TableName'[Month]);
                                           'TableName'[Month]<=MAX('TableName'[Month])
                                   )
                        )

 

Substitute 'TableName' with the name that your table has when imported into Power BI.

Then Measure2, Measure3 similar but use columns Amount2, 3...

 

Create the visual by adding a line chart and put Month on Axis and the three measures in Values.

 

Br,

Magnus

@magsod this is great!

Thank you very much!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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