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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Denismc
Helper II
Helper II

hide lines in graph without affecting the total percentage

Hi,

 

I have an arrears line chart and its a percentage of the total book each month, i only want to show 3 arrears categories againset the total and allow for filter of areas. if I filter the lines out the percentages change. Is there a way to hide an line so percentages don't change 

 

Thanks

1 ACCEPTED SOLUTION
v-jiewu-msft
Community Support
Community Support

Hi @Denismc ,

Based on my testing, please try the following methods:

1.Create the simple table.

vjiewumsft_0-1714102673489.png

2.Create the new measure to calculate the percentage and hide one line.

 

Measure = 
VAR categ = SELECTEDVALUE('Table test'[Category])
VAR da = CALCULATE(SUM('Table test'[Arrears]), ALLEXCEPT('Table test', 'Table test'[Category], 'Table test'[Date]))
VAR arrea = CALCULATE(SUM('Table test'[Arrears]), ALLEXCEPT('Table test', 'Table test'[Category]))
RETURN
IF(categ = "ab", BLANK(), DIVIDE(da, arrea)
)

 

3.Drag the field and measure into the line chart visual.

vjiewumsft_1-1714102716389.png

4.The result is shown below.

vjiewumsft_2-1714102722394.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-jiewu-msft
Community Support
Community Support

Hi @Denismc ,

Based on my testing, please try the following methods:

1.Create the simple table.

vjiewumsft_0-1714102673489.png

2.Create the new measure to calculate the percentage and hide one line.

 

Measure = 
VAR categ = SELECTEDVALUE('Table test'[Category])
VAR da = CALCULATE(SUM('Table test'[Arrears]), ALLEXCEPT('Table test', 'Table test'[Category], 'Table test'[Date]))
VAR arrea = CALCULATE(SUM('Table test'[Arrears]), ALLEXCEPT('Table test', 'Table test'[Category]))
RETURN
IF(categ = "ab", BLANK(), DIVIDE(da, arrea)
)

 

3.Drag the field and measure into the line chart visual.

vjiewumsft_1-1714102716389.png

4.The result is shown below.

vjiewumsft_2-1714102722394.png

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks for the responce, while that is a solution, ideally having a hide option on a chart would fix the issue on any element to be used. Have a great weekend. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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