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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Dividing column with COUNT of another column.

 
I want to divide the sum of a column by the count of another column. Am I using the correct DAX for the calculated column as per above? I also have a 'Year' filter (picture as shown below). But my formula only shows the percentage for all Year(2017-2020). I want to see the percentage for each year. How can I do that?

 

Note: I have 2 lines that are using the same formula. One is to divide(as per the above first picture) & another one is to divide and find the average. When I tried other DAX that I found online, most of them will combine those two lines and only showing one line. How can I solve this?

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , not very clear. But this should be measure. This seems like a column.

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

amitchandak
Super User
Super User

@Anonymous ,Please find attached file after signature. I changed the column and create a new measure too

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@Anonymous ,Please find attached file after signature. I changed the column and create a new measure too

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
amitchandak
Super User
Super User

@Anonymous , not very clear. But this should be measure. This seems like a column.

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi, this is my pbix file. Let me know if you can't open this file.
https://1drv.ms/u/s!AoKh3nlpMpSOglmmXOYLX4OgQowH

According to this pbix, the light blues line is correct already. Now, I want to create an average straight line (dark blue line) by using the same formula. I'm not sure to create a Column or Measure.

The dark blue line is showing the average line for all year. It does not customize for each year. Please show me the correct DAX. Thank you.

The output for the average line (dark blue line) is supposed to be this number.

zhrhr_0-1607922292379.png

 

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors