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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
bee_kissme
Regular Visitor

How I mix two graphs

I set seperate data two groups but I want 3 bar in a graph

 

Now

 

111.png

 

 

Want one graph right pie and line !!!

222.png

6 REPLIES 6
bee_kissme
Regular Visitor

Dear @SqlJason

 

I - Create clustered column chart

Capture.PNG

 

 

II - Create disconnected table 

Capture2.PNG

I think I got the issue. In the second approach, use only the TestAll measure on the values, and the GenderAll[Gender] on the axis. I think you kept all 4 measures on values and nothing on axis.

If you need to use a clustered column to visualise your data it might not visualise to demonstrate the meaning you want. In the sense that for example, if on the same clustered bar column you want to show "All", "Male" and "Female"; the % value for "All" won't show 100% but rather whichever proportion of the new total sum under consideration.

 

Using a vertical bar chart and the legend feature could be a good idea. Or creating your own percentage measures (could even use the quick calc in powerbi) might be a nicer and cleaner solution.

 

A slicer is always a good idea (incredibly useful), plus something I really started to appreciate recently was how if you have two graphs next to each other for example in a report (for example's sake), then if you were to click the "female" component it will transform the graph next to it to only show the female data.

 

Depending upon what your purpose or aim with the data visualisation is; it might be just as easy to simply visualise all, Legend it by Gender as so "Male" & "Female" show their % amounts. Just some ideas, I feel @SqlJason is on the right path/might already have the solution.

SqlJason
Memorable Member
Memorable Member

There are no perfect solutions for this, but I can give you 2 workarounds:-

I - Create clustered column chart

1) Create the below 3 measures (change table names appropriately)

MalePct = CALCULATE(SUM('Fact'[Pct]), 'Fact'[Gender]="Male")

FemalePct = CALCULATE(SUM('Fact'[Pct]), 'Fact'[Gender]="Female")

AllPct = CALCULATE(SUM('Fact'[Pct]), 'Fact'[Gender]="Male" || 'Fact'[Gender]="Female")

 

2) Create clustered column chart with just these 3 measures. You will get all three bars but they will not have the spacing.

 

 

II - Create disconnected table 

1) Create a disconnected table GenderAll with 3 values for Gender - Male, Female, All

2) Now create a measure 

PctWithAll = SUMX(VALUES(GenderAll[Gender]), SWITCH(GenderAll[Gender], "Male", [MalePct], "Female", [FemalePct], "All", [AllPct]))

3) Now create your regular column chart and it show as you want.

temp.png

 

Dear @SqlJason

 

I create following as you but it is not the spacing.

MalePct = CALCULATE(COUNTA(dim_personal[sex]), dim_tec_personal[sex]="male")

FemalePct = CALCULATE(COUNTA(dim_personal[sex]), dim_tec_personal[sex]="female")

AllPct = CALCULATE(COUNTA(dim_personal[sex]), dim_personal[sex]="male" || dim_personal[sex]="female")

TestAll = SUMX(VALUES(dim_personal[sex]), SWITCH(dim_personal[sex], "male", [MalePct], "female", [FemalePct], "all", [AllPct]))

 

 

I - Create clustered column chart

1) Create the below 3 measures (change table names appropriately)

2) Create clustered column chart with just these 3 measures. You will get all three bars but they will not have the spacing.

  

II - Create disconnected table 

1) Create a disconnected table GenderAll with 3 values for Gender - Male, Female, All

2) Now create a measure 

3) Now create your regular column chart and it show as you want.

Can you put an image of your chart as well as an image of your model?

In the image of the chart, please make sure that yo are showing what is on X and Y axis.

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.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors