Forum Discussion
Need you help with this chart
- 3 years ago
haniizz_derar20 try below
First you need to unpivot the last column as per below from power query.
-
there is two way
1. cluster bar chart create measure as per below
Measure =
VAR _A=
COUNT('Table'[index])
VAR _B =
CALCULATE ( COUNT('Table'[index]), ALLSELECTED('Table'[Value]) )
RETURN
DIVIDE ( _A, _B )then plot into chart
2.create stacked bar chart without create any measure direcltly plot in to chart as per below
- 3 years ago
You should unpivot the table first using Power Query.
Select the fields intention to return and possibility to return, right click on them and unpivot columns.
Then create a % share measure using the following formula:
% Share = VAR Volume = COUNT(Sheet1[index]) VAR AllVolume = CALCULATE ( COUNT(Sheet1[index]),ALLSELECTED(Sheet1) ) RETURN DIVIDE ( Volume, AllVolume )Finally create the graph.
PowerBI workspace attached
- 3 years ago
thank you ddpl for your reply
can I know the measure that you used in the previous example ?
and how can I get the same chart as in my question ?
thanks again
haniizz_derar20 try below
First you need to unpivot the last column as per below from power query.
-
there is two way
1. cluster bar chart create measure as per below
Measure =
VAR _A=
COUNT('Table'[index])
VAR _B =
CALCULATE ( COUNT('Table'[index]), ALLSELECTED('Table'[Value]) )
RETURN
DIVIDE ( _A, _B )
then plot into chart
2.create stacked bar chart without create any measure direcltly plot in to chart as per below
thank you ddpl for your reply
can I know the measure that you used in the previous example ?
and how can I get the same chart as in my question ?
thanks again