cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jonwig Frequent Visitor
Frequent Visitor

Showing Multiple Measure in one bar chart cleanly

Hi PowerBIers,

 

I have what I think should be a simple question but cant seem to find the answer to it anywhere.

 

I have market research data, where I have the awareness for a number of brands as different measures. 

 

Extract of Raw data like this

 IDAware Brand1Aware Brand2 Aware Brand3 Aware None 
1Brand1Brand2  
2Brand1   
3 Brand2  
4 Brand2  
5   None
6  Brand3 
7Brand1Brand2Brand3 
8 Brand2  
9 Brand2  
10Brand1Brand2  
11Brand1Brand2  

 

I make measures in Powerbi to derive the % aware for each brand

Aware Brand1 % = count(Data[Aware Brand1])/COUNT(Data[ID])*100

Aware Brand12% = count(Data[Aware Brand2])/COUNT(Data[ID])*100

 

When I want to chart this as a bar chart is is looks pretty bad in PowerBI. Eg I put each indivudal created measure into the value field with no Axis or legend data field. There is no way to get X axis labels, the bars are all squashed together. 

 

Is there a better way of doing this that I am missings so I can use more of the Charting power of PowerBI with data like this?

 

Thanks for the help.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Showing Multiple Measure in one bar chart cleanly

Hi ,

 

Bit of a workaround but you could create a new table (by using Enter Data) with the name of your measures:

 

Table Name: Aware
Aware Headers:
Aware Brand1
Aware Brand2
Aware Brand3
Aware None

 

Then create a switch statement like the below:

 

SWITCH (
    MIN ( 'Aware'[Aware Headers] ),
    "Aware Brand1", [Aware Brand1],
    "Aware Brand2", [Aware Brand2],
    "Aware Brand3", [Aware Brand3],
    "Aware None", [Aware None]
)

 

Use the switch statement above as your value and use your Column Headers from the table as your X axis

2 REPLIES 2

Re: Showing Multiple Measure in one bar chart cleanly

Hi ,

 

Bit of a workaround but you could create a new table (by using Enter Data) with the name of your measures:

 

Table Name: Aware
Aware Headers:
Aware Brand1
Aware Brand2
Aware Brand3
Aware None

 

Then create a switch statement like the below:

 

SWITCH (
    MIN ( 'Aware'[Aware Headers] ),
    "Aware Brand1", [Aware Brand1],
    "Aware Brand2", [Aware Brand2],
    "Aware Brand3", [Aware Brand3],
    "Aware None", [Aware None]
)

 

Use the switch statement above as your value and use your Column Headers from the table as your X axis

Jonwig Frequent Visitor
Frequent Visitor

Re: Showing Multiple Measure in one bar chart cleanly

Perfect thank you. It worked just as you described.

 

(It is a shame you have to use work arounds for this data setup. For market research it is quite a standard.)

 

Jon