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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Creating Comparison Bar Chart - Multiple Categories (using measures)

I need to create a graph that shows comparison of several categories between 2 periods (Q1 and Q2 2023)

 

So I created measures to calculate averages of columns in Table 1 (Q1 2023) and Table 2 (Q2 2023)

 

Example:

Table 1

A Q1 2023 average measure

B Q1 2023 average measure

...

Table 1

A Q2 2023 average measure

B Q2 2023 average measure

...

On a simple table, it will look like this:

 

Category2023 Q12023 Q2
A8.697.69
B8.577.57
C8.137.13
D8.347.34
E8.47.4
F8.77.7
G8.797.79
H8.577.57
I8.777.77
J8.447.44
K9.038.03
L8.77.7
M8.47.4
N8.517.51
O8.837.83
P8.837.83

 

Now, I want to create one graph that will look like this using the measures, but it's just lumping in all the bars:

 

Nogstai_0-1688741616355.png

 

I cannot think of how to put it this way. Should I create a separate table that calls the categories  and their values (and how)? I don't know how to begin doing it.

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @Anonymous ,

According to your description, I create a sample to reproduce the problem.

Table1:

vyanjiangmsft_0-1688970000436.png

Table2:

vyanjiangmsft_1-1688970025204.png

I create two measures:

2023 Q1 = AVERAGE(Table1[Q1 2023])
2023 Q2 = AVERAGE(Table2[Q2 2023])

In a clustered column chart, put Category in X-axis and the two measures in Y-axis, get the result:

vyanjiangmsft_2-1688970139565.png

Is this your expected result? I attach my sample below for your reference.

 

Best regards,

Community Support Team_yanjiang

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

Anonymous
Not applicable

Actually, the Categories A-Z are actually columns in each of my two tables, with 1-10 values.

 

For example:

 

Table 1         
CountryLocationABCDEFGH
USNew York86558865
PhilippinesManila74647746
PhilippinesManila63765637
USCalifornia44574445
UKLondon58233582
AfricaJohannesburg7810857810
USNew York89298892
UKIreland96879968
AustraliaSydney1074621074

 

 

Table 2         
CountryLocationABCDEFGH
Latin AmericaBrazil87645789
Latin AmericaMexico64348896
AustraliaMelbourne567521028
New ZealandNew Zealand54673897
EMEAGreece87543589
EMEAFrance87645789
USNew York64348896
EMEAGreece567521028
AustraliaSydney1074621074

 

The measures I created were Q1 A, Q1 B, etc etc. then Q2 A, Q2 B. But when I'm creating a graph, it doesnt show that way. They are all lumped together.

 

The measures I created, if I put it in excel, will look like this:

Nogstai_0-1688975400520.png

 

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

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.

Top Solution Authors