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,
I am trying to get the % values of Adjusted Act Hrs by Visits_Duration using this measure ->
Adjusted Act Hrs % = DIVIDE(SUM(vw_PivotOTIF[Adjusted Act Hrs]),SUM(vw_PivotOTIF[Visits_Duration]))
This works perfectly. The problem occurs when I need to base this next measure (Visits 90-99 %) on the above (Adjusted Act Hrs %)->
Visits 90-99 % = CALCULATE(COUNTROWS(vw_PivotOTIF),vw_PivotOTIF[Adjusted Act Hrs %]<=99 && vw_PivotOTIF[Adjusted Act Hrs %]>=90)
It gives me the error -> A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
I kind of got around it by using this instead->
Act Hrs % = vw_PivotOTIF[Adjusted Act Hrs]/vw_PivotOTIF[Visits_Duration]*100
However this doesn't give me 100% accurate results.
Any idea how to I can get 100% accurate results?
Regards,
Gerry
Try to add the "Adjusted Act Hrs %" as variable in your "Visits 90-99 %" measure:
Visits 90-99 % = VAR AdjustedActHrs = DIVIDE ( SUM ( vw_PivotOTIF[Adjusted Act Hrs] ), SUM ( vw_PivotOTIF[Visits_Duration] ) ) RETURN CALCULATE ( COUNTROWS ( vw_PivotOTIF ), AdjustedActHrs <= 99 && AdjustedActHrs >= 90 )
Regards,
Hi Simon,
Thanks for the reply. Still no luck. This is giving me the error 'The True/False expression does not specify a column. Each True/False expressions used as a table filter expression must refer to exactly one column.'
Gerry