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
MTTsoftwareuser
Frequent Visitor

DAX Filtering on a Column (Twice) and then Dividing the Related Data from Other Columns

Amongst my table I have Columns that include [Has WO], [Multiple WO], and [Hours].  I want to find all of my records where [Has WO] = "YES" and divide those records where [Has WO] = "YES" and [Multiple WO] = "Multiple" but I want to divide the [Hours] that are associated with the first filter by the [Hours] associated with the second filter.  So, let's say there are 20 records that satisfy the first condition and 80 that satisfy the second condition - the result shouldn't be (or likely won't be) 25% because the 20 records might have 102 hours associated and the 80 records might have 405 hours - I want the 102/405.  I came up with this but I don't think it is working...

 

Chart 4b = DIVIDE(
CALCULATE(
SUM ('Data'[Hours]),
FILTER (Data,Data[Has WO] = "YES")),
CALCULATE(
SUM ('Data'[Hours] ),
FILTER (Data,'Data'[Has WO] = "YES" && (Data[Multiple WO] = "MULTIPLE")
)
))
 
Thanks!
6 REPLIES 6
Ashish_Mathur
Super User
Super User

Hi,

What exact problem are you facing?  Also, your formula can be simplified to:

Chart 4b = DIVIDE(CALCULATE(SUM ('Data'[Hours]),Data[Has WO] = "YES"),CALCULATE(SUM ('Data'[Hours]),'Data'[Has WO] = "YES",Data[Multiple WO] = "MULTIPLE"))

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

My source chart done through Excel generated this correctly

MTTsoftwareuser_0-1682234665467.png

My Power BI chart looks like this

4a.jpg

Hi,

In the Formatting pane, edit the Y axis intervals/numbers


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thanks - but nothing here is changing the result...

 

c4.png

Hi,

Share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hmm how do I attach a file here?

Helpful resources

Announcements
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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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