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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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.

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

 

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

 

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.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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