cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

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
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Dashboard in a day with date

Exclusive opportunity for Women!

Join us for a free, hands-on Microsoft workshop led by women trainers for women where you will learn how to build a Dashboard in a Day!

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors