Power Pivot running total by categrory repeating for other groupings.

dicken

Active Member
Joined
Feb 12, 2022
Messages
283
Office Version
  1. 365
Platform
  1. Windows
Hi,
I've had this problem before and am pretty certain use and "IF" statement to solve it but cannot get the right result,
Example formula ;

Excel Formula:
RTM Just  a :=
VAR calcA =
    CALCULATE (
        [totalSales],
        FILTER (
            CROSSJOIN ( ALL ( Table1[Date] ), ALL ( Table1[Item] ) ),
            Table1[Date] <= MAX ( Table1[Date] )
                && Table1[Item] = "a"
        )
    )
RETURN
   CalcA

1663689922722.png


This gives the correct result but repeats it for every grouping not just 'a' how can I stop this? There are Totals for every row so can't use ;
IF(TotalSales, Calc , Blank()) , but think I need to use something along these lines.

Richard.
 

Excel Facts

Why are there 1,048,576 rows in Excel?
The Excel team increased the size of the grid in 2007. There are 2^20 rows and 2^14 columns for a total of 17 billion cells.
Hi,
I've had this problem before and am pretty certain use and "IF" statement to solve it but cannot get the right result,
Example formula ;

Excel Formula:
RTM Just  a :=
VAR calcA =
    CALCULATE (
        [totalSales],
        FILTER (
            CROSSJOIN ( ALL ( Table1[Date] ), ALL ( Table1[Item] ) ),
            Table1[Date] <= MAX ( Table1[Date] )
                && Table1[Item] = "a"
        )
    )
RETURN
   CalcA

View attachment 74382

This gives the correct result but repeats it for every grouping not just 'a' how can I stop this? There are Totals for every row so can't use ;
IF(TotalSales, Calc , Blank()) , but think I need to use something along these lines.

Richard.
Use keepfilters in the total sales measure
Excel Formula:
Just 'a' Total Sales:=CALCULATE([Total Sales], KEEPFILTERS(FILTER(ALL(Table1[Item]),Table1[Item]= "a" ) ) )
 
Upvote 0
Solution

Forum statistics

Threads
1,215,094
Messages
6,123,071
Members
449,092
Latest member
ipruravindra

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