March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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.
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
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
What am I doing wrong here?
Solved! Go to Solution.
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
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @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
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThank 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
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsMarch 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
119 | |
88 | |
73 | |
67 | |
49 |
User | Count |
---|---|
199 | |
140 | |
96 | |
77 | |
68 |