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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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