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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
corporate
Helper I
Helper I

Hide lines in stacked line chart

Hi everyone,

 

I had to create a line chart as an user asked in this post: https://community.powerbi.com/t5/Desktop/Line-Chart-With-Values-As-a/td-p/199703 and it worked. Here is my chart:

 

line.png

 

What I need to do now, is to create a filter for the Category in my chart (Age Range) that doesn't affect the values in the chart, but simply hides the lines (all other filters should work as usual).

 

For example, when I select Age 18-40, the chart adjusts its values and displays a single line with value 1 (100%),

line.png

 

But I don't want adjusted values, I need the same line of the previuos chart, as if all the other lines have been simply hidden.

 

Can you help me?

 

Thank you!

1 ACCEPTED SOLUTION

@corporate 

 

Try this

 

Production Age =
DIVIDE (
    SUM ( 'ANALYSIS AQ_MONITORING_DEEPDIVE'[PRODUCTION] ),
    CALCULATE (
        SUM ( 'ANALYSIS AQ_MONITORING_DEEPDIVE'[PRODUCTION] ),
        ALL ( 'ANALYSIS AQ_MONITORING_DEEPDIVE'[Age Range] )
    )
)

 



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

View solution in original post

4 REPLIES 4
nandukrishnavs
Community Champion
Community Champion

@corporate - Could you share the pbix file/sample tables and existing measure logic. 


Regards,
Nandu Krishna

Hi @nandukrishnavs , unfortunately with my account I can't share the pbix file, but here is an example of my table:

MonthTargetRegionAge RangeProduction
201912DomesticoLombardia18 - 4010
201912DomesticoLombardia40 - 5015
201912Micro BusinessLombardia18 - 4020
202001DomesticoLombardia18 - 405
202001DomesticoPiemonte18 - 407
202001Micro BusinessPiemonte18 - 4015
202001Micro BusinessPiemonte40 - 5020
202002DomesticoLombardia18 - 4015
202002DomesticoLombardia50 - 6020
202002DomesticoPiemonte40 - 504
202002Micro BusinessPiemonte50 - 6012
202002Micro BusinessLombardia18 - 4016

 

and this is the measure I created and used as Values in line chart:

 

 

Production Age = 
DIVIDE (
    SUM ( 'ANALYSIS AQ_MONITORING_DEEPDIVE'[PRODUCTION] ),
    CALCULATE ( SUM ( 'ANALYSIS AQ_MONITORING_DEEPDIVE'[PRODUCTION] ), ALLSELECTED ( 'ANALYSIS AQ_MONITORING_DEEPDIVE'[AGE_RANGE] )))

 

 

line.png Thank you!

@corporate 

 

Try this

 

Production Age =
DIVIDE (
    SUM ( 'ANALYSIS AQ_MONITORING_DEEPDIVE'[PRODUCTION] ),
    CALCULATE (
        SUM ( 'ANALYSIS AQ_MONITORING_DEEPDIVE'[PRODUCTION] ),
        ALL ( 'ANALYSIS AQ_MONITORING_DEEPDIVE'[Age Range] )
    )
)

 



Did I answer your question? Mark my post as a solution!
Appreciate with a kudos
🙂


Regards,
Nandu Krishna

It works! Thank you very much!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Users online (3,472)