Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
android1
Post Patron
Post Patron

Error when basing a measure on another measure which uses DIVIDE

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

 

2 REPLIES 2
v-sihou-msft
Microsoft Employee
Microsoft Employee

@android1

 

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

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors