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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Anonymous
Not applicable

Matrix with multiple months and percentages

Hello community,

 

I have a problem and I think it would be not so hard, but I haven't yet experience with this tool.

I have a Matrix with following elements (from the visualizations pane)

  • Rows: Customers
  • Columns: Status (can be OK or KO), Month.
  • Values: Number of IDs (count of those unique identifiers) , % (percentage of those IDs on the total).

If I select one month, I have (say)

statusKO OK TOTAL
monthoctober    
customerN%N% 
AAA2020%8080%100%

 

But If I select more than one month (say two) I need to have that every month sum up at 100% in every subtotal. Instead, I obtain the percentage of grand total and that's not what I want..

 

THere is a Measure I could create to achieve this goal?

 

Thanks in advance!

1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

You can try to create a measure like below:

Measure = 
var current_ = DISTINCTCOUNT('Table'[ID])
var total_per_month = CALCULATE(DISTINCTCOUNT('Table'[ID]),ALLEXCEPT('Table','Table'[Month]))
return DIVIDE(current_,total_per_month)

Vlianlmsft_0-1636964604428.png

 

View solution in original post

2 REPLIES 2
V-lianl-msft
Community Support
Community Support

You can try to create a measure like below:

Measure = 
var current_ = DISTINCTCOUNT('Table'[ID])
var total_per_month = CALCULATE(DISTINCTCOUNT('Table'[ID]),ALLEXCEPT('Table','Table'[Month]))
return DIVIDE(current_,total_per_month)

Vlianlmsft_0-1636964604428.png

 

amitchandak
Super User
Super User

@Anonymous , Try a measure like

 

divide(count(Table[unique identifiers]) ,calculate( count(Table[unique identifiers]), removefilters(Table[Status])) )

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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