Forum Discussion

MinCK's avatar
MinCK
Frequent Visitor
1 year ago
Solved

ratio calculation

Hello experts,

 

I am new and learning power bi. I have a goal to calculate the 6 months average of daily ratio of my client demographics. Like, 40% Asian, 30% White, 30% African each day and average to around 45% Asian, 25% White bla bla in the past 6 months. I have two tables, Census table and Client table, where they were joined by client_id column.. the clients' races are in the Client table.  I can manage to get the individual races 6 months daily average by using CALCULATE functions. However, I don't want to write all measures to get all races available (almost 10) in my Clients table. Additionally, I have other demographic information to be concerned like Gender and Age.  Is there a way that I can create a measure that calculate the average of the daily ratio by just bringing in the measures as a value and Race (and other demographics) as a rows?

 

 

Example of my measure to calculate Gender, good that there is only two, but if there is more I have to write another calculate measure to catch it.đŸ˜” Woud love to get the same idea that just bringing Gender as a rows and Ratio as a values, not just creating new measures to what ever Genders pop up.

 

 

 

2 Replies