cancel
Showing results for
Did you mean:

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Frequent Visitor

## How create a measure to show percentage of a category per month in a stacked column chart?

Hello!

I'm trying to create a measure to show a percentage of category per month in stacked column chart.
First, I created a measure to show the percentage of total and showed it in tooltip:

``````%QTD_TotalCateg =
var denom = calculate(count('Planilha 1'[Aplicabilidade]), ALLSELECTED())
return divide (num,denom,0)``````

Ex: 2 "No" in April = 6.67% of total (2/30)

Now I want to know how to create a measure that show percentage of total of month to show in tooltip.

Ex: 2 "No" in April = 33.33% of total of April (2/6)

1 ACCEPTED SOLUTION
Super User

pls try this. i didn't change the measure type, you can change it to percentage.

``Measure = countx(FILTER('Table','Table'[Aplicabilidade]="No"),'Table'[Aplicabilidade])/CALCULATE(COUNT('Table'[Aplicabilidade]),ALLEXCEPT('Table','Table'[Mês]))``

pls see the attachment below

Proud to be a Super User!

3 REPLIES 3
Super User

pls try this. i didn't change the measure type, you can change it to percentage.

``Measure = countx(FILTER('Table','Table'[Aplicabilidade]="No"),'Table'[Aplicabilidade])/CALCULATE(COUNT('Table'[Aplicabilidade]),ALLEXCEPT('Table','Table'[Mês]))``

pls see the attachment below

Proud to be a Super User!

Frequent Visitor

Thank you, its worked for me.

I ll use without the "filter".

Super User

you are welcome

Proud to be a Super User!

Announcements

#### Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

#### Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

#### The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors