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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
watje255_ju
Helper III
Helper III

A function 'PLACEHOLDER' has been used in a True/False expression error in aging calculation

I am wanting to create aging bands for Inventory - for example stock shelf life 0-1 months, 1-6 months, 7-12 months 13+, but when i try the dax measure  , i get the error A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed. 

Can someone help with this please and explain why this is happening?

Thank you! 

PBIX here SLOB.pbix which included desired result 

7 REPLIES 7
watje255_ju
Helper III
Helper III

Thanks again still not working properly, can you access the PBIX File? 

 

For the first example i get the same error as noted in the original post, and the second formula doesn't return the expect values for the buckets when altering the formula for 13+ months for example, thanks again for your help

Hi, @watje255_ju 

 

Month =

 

CALCULATE(

 

    [Stock On Hand],

 

  Filter (table name,  [Shelf Life Remaining] > 1)

 

) or 

 

Stock On Hand with Shelf Life 1-6 Months =

 

CALCULATE(

 

    [Stock On Hand],

 

    Filter (tablename,[Shelf Life Remaining] >= 1 && [Shelf Life Remaining] <= 6)

 

)

And the same logic for 7-12 months returns the above values when I am after 309 

watje255_ju_1-1702245706730.png

Thanks again 🙂

 

watje255_ju_0-1702245503015.png

Hi, thanks for your reply, the formula isn't working as expected, I should only be getting 39,198 , not 39,809, do you know why? Thanks!!

Dangar332
Super User
Super User

Hi, @watje255_ju 

 

In your measure threr are multiple conditions in filter expression use it in filter () function 

 

Like

Filter (tablename, condition 1& condition 2)

 

Refer Here for similar solutions 

Thanks for your reply! I am not filtering the table, but a measure, 

Stock On Hand with Shelf Life > 1 Month =
CALCULATE(
    [Stock On Hand],
    [Shelf Life Remaining] > 1
) or 
Stock On Hand with Shelf Life 1-6 Months =
CALCULATE(
    [Stock On Hand],
    [Shelf Life Remaining] >= 1 && [Shelf Life Remaining] <= 6
)
 
Would you mind showing the correct Dax formula in the PBIX (link above) Thanks again!

Hi, @watje255_ju 

 

Try below

Month =

CALCULATE(

    [Stock On Hand],

    [Shelf Life Remaining] > 1

) or 

Stock On Hand with Shelf Life 1-6 Months =

CALCULATE(

    [Stock On Hand],

    Filter (tablename,[Shelf Life Remaining] >= 1 && [Shelf Life Remaining] <= 6)

)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 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.