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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
rfwjr64
Frequent Visitor

Dividing

Hello, I am trying to divide a subset of values in one column by the total of the same column.   What I am trying to determine is how many records have an EAU$ of less than $2000 and divide that number by the total number of EAU$ records.  Because some records are duplicates, I would like to find the distinct count for both the under $2k and the overall.   I have a column labeled 'Total EAU$.  I want divide the distinct count of all EAU$ under $2000 by the distinct count of all of the EAU$.

 

I would like to show the two values in a pie chart to demonstrate how many under $2k records are a part of the total records.

 

I don't have an example of what I am doing, unfortunately. 

 

Any help or guidance would be greatly appreciated. 

1 ACCEPTED SOLUTION
Pragati11
Super User
Super User

Hello @rfwjr64 ,

You can create a measure as follows:

calcMeasure - DIVIDE(
CALCULATE(DISTINCTCOUNT(tablename[EAU$]), tablename[EAU$] < 2000),
DISTINCTCOUNT(table name[EAU$]), 0)

Use the table name and column name in the previous DAX expression.

Thank you

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@rfwjr64 , Try a new measure like

divide(calculate(distinctcount(Table[Column), filter(Table, Table[EAU]<2000)),distinctcount(Table[Column))

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
darentengmfs
Post Prodigy
Post Prodigy

Hi @rfwjr64 

 

The way I would approach this is creating a new column: $ Group = IF([Total EAU$] >2000, "More than $2,000","$2,000 or Less")

 

Then, put a pie chart in your report, under the Values field, put in the distinct ID you have for each row, e.g. SalesID and change the Count to Count Distinct, and put [$ Group] in the legends.

Pragati11
Super User
Super User

Hello @rfwjr64 ,

You can create a measure as follows:

calcMeasure - DIVIDE(
CALCULATE(DISTINCTCOUNT(tablename[EAU$]), tablename[EAU$] < 2000),
DISTINCTCOUNT(table name[EAU$]), 0)

Use the table name and column name in the previous DAX expression.

Thank you

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

This does help. Now I can move on. Thank very much.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.