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! Learn more

Reply
Stuznet
Helper V
Helper V

Divide With 2 filters Measure

 

On an Excel I created a matrix for Late and On-Time is based on Status 2 Column. I want to know how to divide column "=C/D" with a Status text filter "Late" and "On-Time"? Column E is what I'm looking for is the percentage. 

 2018-09-08_9-33-00.png

I created a measure 

Measure= DIVIDE(SUM(Data[ID]), SUM(Data[Status2]), FILTER(Data,Data[Status2] = "Late" && Data[Status2]="On-Time"))

 

but I'm getting an error 

2018-09-08_9-30-42.png

 

Then I tried this formula 

Measure2 = DIVIDE(CALCULATE(SUM(Data[ID]),Data[Status2]="Late"),CALCULATE(SUM(Data[ID]),Data[Status2] = "On-Time"))

 

I got this error

Capture.PNG

 

What am I doing wrong here?

1 ACCEPTED SOLUTION
MFelix
Super User
Super User

Hi @Stuznet,

 

You second measure is correct however you need to do a count your ID column is type text and you cannot sum text fields.

 

Measure2 =
DIVIDE (
    CALCULATE ( COUNT ( Data[ID] ), Data[Status2] = "Late" ),
    CALCULATE ( COUNT ( Data[ID] ), Data[Status2] = "On-Time" )
)

Regards,

MFelix

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @Stuznet,

 

You second measure is correct however you need to do a count your ID column is type text and you cannot sum text fields.

 

Measure2 =
DIVIDE (
    CALCULATE ( COUNT ( Data[ID] ), Data[Status2] = "Late" ),
    CALCULATE ( COUNT ( Data[ID] ), Data[Status2] = "On-Time" )
)

Regards,

MFelix

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Thank you so much it worked I just need to change the whole number to Percentage. 🙂 

Select the measure and on the modeling tab select the %.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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