Sum, Average or last Month Accumulation - MEASURE Power Bi/Query

zapppsr

Board Regular
Joined
Aug 19, 2010
Messages
189
Hi guys:

This is a matter that comes and go but eventually haunts me and I need to face it.

I need to create a measure that takes in consideration the type of accumulation and give different totals: Sum, Average or Last month value.

The image below ilustrates the problem. I managed to do it but not in a professional and clean way.

Here I'm sure there are some very capable people that can help me.

Thanks in advance.

95wmc4.png
 
Last edited:
Here is the link for the Workbook: Link

The workbook Plan2 has 3 pivot tables. Try to add more than one product to the filter and you will know what I mean...
 
Upvote 0

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
Hi, zapppsr!
Alright.
Let's select all product of page filter for your top pivot table. What does a pivot C4-cell see?
Let's switch to a Power Pivot window and set a filter of NM column to 1 only.
Look at a picture below.
x5zfxu.png

It is a filter content of Plan1 table for that C4-cell. We can see that Accumulation column contains next values "Sum", "Average" and "Last".
Which a measure does have to be computed in this case? Maybe do you want to see three those measure separeted by any delimiter?
Regards, Andrey
 
Upvote 0
OMG, I think I'm crazy!! You were right all along!! (Genius)!!

Once I put the products in line, and months as columns, as it was intended to be since the beginning, it worked!! (See Slide 4 - link)
I didn't try it before because using the method with 3 auxiliary measures didn't work...

But in your way, with only one measure not only it works but is much cleaner, simpler and professional.

I knew I could count on you!!! Thank you very much.
 
Upvote 0

Forum statistics

Threads
1,224,163
Messages
6,176,814
Members
452,744
Latest member
Alleo

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top