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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
mahendi
Helper I
Helper I

subtotal blank for running total in matrix

I have the following matrix and table, the subotal is missing in the running totals where the category is empty.

 

mahendi_0-1606258526545.png

CategorySub CategorySub Category 2AmountDate
11.11.1.1101/01/20
11.21.2.1101/02/20
11.31.3.1101/03/20
11.11.1.2101/04/20
11.21.2.2101/05/20
11.31.3.2101/06/20
22.12.1.1101/06/20
22.12.1.2101/05/20
22.22.2.2101/04/20
22.22.2.1101/03/20
22.32.3.1101/02/20

 

I used quick measure for running total - 

Amount running total in Category =
CALCULATE(
    SUM('Sheet1'[Amount]),
    FILTER(
        ALLSELECTED('Sheet1'[Category]),
        ISONORAFTER('Sheet1'[Category], MAX('Sheet1'[Category]), DESC)
    )
)
 
is there a way to display the running total in subtotal where the category has no values?

 

4 REPLIES 4
mahoneypat
Employee
Employee

I added some February rows for only Cat 1 to your sample data to reproduce your issue.  Your measure worked fine for me when I did.  Is this the needed behavior?

 

mahoneypat_0-1606316284134.png

 

Regards,

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


@mahoneypat  The grand total is there, but the subtotal is still missing even in your table.

example.jpg

mahoneypat
Employee
Employee

Please try this expression.  It references your existing measure but should replace it in the visual.

 

NewMeasure = SUMX(VALUES('Sheet1'[Category]), [Amount running total in category])

 

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


@mahoneypat  sorry it did not work

it does not fill the blank sub total and has also replaced running total with category total

mahendi_0-1606270853512.png

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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