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
dwalex
Regular Visitor

Show total and detail lines in line chart

I am using DirectQuery to a tabular model. I have a multimillion row fact table.  I'm trying to show, on a single line chart, the detailed ratios over a 20 year period, of acceptances. There are 6 slicers, one of which is the states to be displayed, one line each. All this works.

 

I have measures for Allowances, and Determinations, and a measure that excludes the state slicer to report the national ratio:

 

 

=CALCULATE([Initial Allowances] / [Initial Determinations], ALL('Region - States')

 

 

They all work fine.

 

When I select one or more states I can see one value line summarizing the ratio for all the select states, and a secondary value shows the national value (excluding the state slicer.) But I need to use the state as the Legend in the line visual, so I can see individual lines for each state. PBI won't let me put the national measure into the secondary value, if the state is used as the Legend for the visualization. And the reverse is true, I can't add the state to the legend if I already have the national rate in the secondary value.


How do I combine them both on one visualization?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@dwalex , in clustered bar visual on in the line visual the secondary line, will not split by legend. 

You can use transparent background and put visual one below the other, but that will not guarantee  correct axis overlap

 

check for custom visual https://appsource.microsoft.com/en-us/marketplace/apps?product=power-bi-visuals

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@dwalex , in clustered bar visual on in the line visual the secondary line, will not split by legend. 

You can use transparent background and put visual one below the other, but that will not guarantee  correct axis overlap

 

check for custom visual https://appsource.microsoft.com/en-us/marketplace/apps?product=power-bi-visuals

Something of a hack, but that seems common in PBI.

Also, FYI, I've just added for evaluation a custom visual called Comparison Chart. The simple description makes it sound appropriate.

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.