Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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
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
Thanks again 🙂
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!!
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,
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)
)
User | Count |
---|---|
16 | |
14 | |
13 | |
12 | |
11 |
User | Count |
---|---|
19 | |
16 | |
15 | |
11 | |
9 |