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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

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
November Carousel

Fabric Community Update - November 2024

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

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.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.