The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi All,
I have table that stores drivers' business miles driven and the days reported. The business has asked to set a status as either 'Compliant' or not 'Not-Compliant' based on the formula ->
Annualized Cummulative Business Miles = Total Business Miles/Total Days Reported * 365
I created a calculated column that tells if a particular driver is compliant or not. If a driver crosses 12k miles, then he/she is compliant, otherwise not.
The issue I am facing is that drivers with less than 12k miles are being placed as 'Compliant'
Here is the DAX function I used ->
Solved! Go to Solution.
@tkirilov., thanks for your help. I guess the issue for that I was using a Calculated Column inplace of a measure.
Using this measure -
@Anonymous
Try a bracket..
IF((DIVIDE(SUM(fleet[Total Business Miles]),SUM(fleet[Total # Days Reported])) * 365 )>= 12000, "Compliant", "Non-Compliant")
If it helps, mark it as a solution
Kudos are nice too
@VasTg- Thanks! I'll try using brackets. In this scenario, it'll be -
Compliance Status = IF(DIVIDE((SUM(fleet[Total Business Miles])*365),SUM(fleet[Total # Days Reported])) >= 12000, "Compliant", "Non-Compliant")
Btw, I created separate measures for Total Business Miles, Total Days reported, then made a new measure with projected business miles. Finally, I created a new column ->
Status =
Hi @Anonymous ,
Try this:
Compliance Status = IF(DIVIDE(SUM(fleet[Total Business Miles]),(SUM(fleet[Total # Days Reported])) * 365) >= 12000, "Compliant", "Non-Compliant")
@tkirilov., thanks for your help. I guess the issue for that I was using a Calculated Column inplace of a measure.
Using this measure -