cancel
Showing results for 
Search instead for 
Did you mean: 

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

Reply
dajensen123
New Member

Row level percentage calculation for a given year

Hello,

I have multiple years in my data set and need to calculate the total % by the indiviual row for that given year.  I've created a measure to give me the total for 2022, 2023.  However, when I create the meausure for the % each row will give me 1.00.  In reading about row calculations it looks like countrows needs to be in the measure.  When I've tried different things it returns a syntax error.  

 

2022 % Status Reason = DIVIDE([Total Reasons 2022],COUNT('Table 1 (Export)'[Status Reason]))
tried this below
2022 % Status Reason = DIVIDE([Total Reasons 2022], COUNTROWS(FILTER('Table 1 (Export)', YEAR('Table 1 (Export)'[Date]) = 2022)))
 
Thanks

 

 

1 REPLY 1
v-shex-msft
Community Support
Community Support

HI @dajensen123 ,

It seems like a common issue when measure expression calculates on multiple level aggregates. I’d like to suggest you can refer to the Greg’s blog to add a variable with SUMMARIZE function to handle the first level and use iterator function to apply the second level.

Measure Totals, The Final Word 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

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

Community News

Fabric Community News unified experience

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

Power BI Fabric Summit Carousel

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