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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
AlejandroPCar
Helper IV
Helper IV

Show Percent of Total values in a Line Chart by Year

Hi!

 

I have a measure of Percent of Total and works fine, but when I put that measure in a Line Chart dosent show me the correct values. I mean in 2015 the percent of some region's GDP in the total country's GDP was 25% and in the 2014 was 23% and 2013 was 21% and so on. I want these values in a Line Chart.

 

How can I do that?

 

Here is my pbix file if it will be necesary https://1drv.ms/u/s!AtTnrgPUQzQCgyIOQaCQ4q9M5tZW

 

Thanks for read me!

 

 

1 ACCEPTED SOLUTION
Vvelarde
Community Champion
Community Champion

@AlejandroPCar

 

Hi, change your measure to this:

 

Aporte al Crecimiento Anual =
IF (
    OR (
        [Variacion PIB Anual] = 0;
        ( CALCULATE ( [Variacion PIB Anual]; ALLSELECTED () ) ) = 0
    );
    0;
    DIVIDE (
        [Variacion PIB Anual];
        CALCULATE (
            [Variacion PIB Anual];
            ALLEXCEPT ( Tiempo; Tiempo[Año] );
            ALL ( 'Geográfico' )
        );
        0
    )
)

PIB.png




Lima - Peru

View solution in original post

2 REPLIES 2
Vvelarde
Community Champion
Community Champion

@AlejandroPCar

 

Hi, change your measure to this:

 

Aporte al Crecimiento Anual =
IF (
    OR (
        [Variacion PIB Anual] = 0;
        ( CALCULATE ( [Variacion PIB Anual]; ALLSELECTED () ) ) = 0
    );
    0;
    DIVIDE (
        [Variacion PIB Anual];
        CALCULATE (
            [Variacion PIB Anual];
            ALLEXCEPT ( Tiempo; Tiempo[Año] );
            ALL ( 'Geográfico' )
        );
        0
    )
)

PIB.png




Lima - Peru

Hi @Vvelarde

 

Thanks so much!

 

It works!

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors