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
boa
Helper I
Helper I

Display a running total percentage on a card

Hello

 

I'm trying to get a running total percentage on a card in a PowerBi report but I get a blanco card.

I have a measure for the running total and for the running total percentage. 

 

I get this matrix:

 

boa_0-1694077290098.png

I want to show the Running Total Percentage of category 3 on a card. (a card with 72,04% on it)

Do I have to make a new measure for this card? I tried some but get always (BLANK) on the card.

 

Many thanks in advance for help!

2 ACCEPTED SOLUTIONS

The card visual has no concept of SELECTEDVALUE.  Use a different aggregation.

View solution in original post

Thank you for your help. I use your code for the running total and now it is working!

boa_0-1694438168842.png

 

 

 

View solution in original post

6 REPLIES 6
v-cgao-msft
Community Support
Community Support

Hi @boa ,

 

Please try:

Running total percentage 3 = 
VAR __numerator = CALCULATE([running total],'Table'[Tijd tss boeking&afspraak_catnr]=3)
VAR __denominator = CALCULATE([running total],ALL())
VAR __result = DIVIDE(__numerator,__denominator)
RETURN
__result

vcgaomsft_0-1694418555676.png

Best Regards,
Gao

Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly --  How to provide sample data in the Power BI Forum

Hello,

Thank you for the code. The code for the running total is working but I still get (BLANK) as result in the card.

 

boa_0-1694428196391.png

 

Thank you for your help. I use your code for the running total and now it is working!

boa_0-1694438168842.png

 

 

 

The card visual has no concept of SELECTEDVALUE.  Use a different aggregation.

lbendlin
Super User
Super User

Consider the filter context.  Show your measure code.

Hello,

 

The code I use for the running total is

running total =
CALCULATE (
    SUM ( 'data afspraken - PBI'[Aantal] );
    FILTER (
        ALLSELECTED ( 'data afspraken - PBI' );
        'data afspraken - PBI'[Tijd tss boeking&afspraak_catnr] <= SELECTEDVALUE ( 'data afspraken - PBI'[Tijd tss boeking&afspraak_catnr] )
            && 'data afspraken - PBI'[Start_jaar] = MAX ( 'data afspraken - PBI'[Start_jaar] )
    )
)

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.