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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
StefanH74
Frequent Visitor

placeholder error in measure

Hi,

 

I have 2 measures: 

- one to determine the last output-date of a product, this one works just fine, and does indeed return the correct date

 

last outputdate = CALCULATE(MAX(fctArtikelposten[Posting_Date]),FILTER(fctArtikelposten,fctArtikelposten[Entry_Type]="Output"))
 
then I have a second measure to determine the first sales-date after the last outputdate (from measure 1)
 
1e salesdate after last outputdate = CALCULATE(CALCULATE(MIN(fctArtikelposten[Posting_Date]),fctArtikelposten[Entry_Type]="Sales"),fctArtikelposten[Posting_Date]>=[last outputdate])
 
on this last measure I get an error: A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
 
anyone know how to fix this??
Thanx, Stefan
1 ACCEPTED SOLUTION
StefanH74
Frequent Visitor

Thanx to everyone for trying to help.

unfortunately your solutions did not work for me.

 

But I managed to get the desired result, not by making a measure, but rather 2 calculated columns in my Item table

View solution in original post

8 REPLIES 8
StefanH74
Frequent Visitor

Thanx to everyone for trying to help.

unfortunately your solutions did not work for me.

 

But I managed to get the desired result, not by making a measure, but rather 2 calculated columns in my Item table

@StefanH74 

Good job 👏 

Anonymous
Not applicable

Hi @StefanH74 ,

 

Please check the formulas. ALLEXCEPT() is to do the calculation based on [product].

last outputdate =
CALCULATE (
    MAX ( fctArtikelposten[Posting_Date] ),
    FILTER (
        ALLEXCEPT ( fctArtikelposten, [product] ),
        fctArtikelposten[Entry_Type] = "Output"
    )
)
1e salesdate after last outputdate =
CALCULATE (
    MIN ( fctArtikelposten[Posting_Date] ),
    FILTER (
        ALLEXCEPT ( fctArtikelposten, [product] ),
        fctArtikelposten[Entry_Type] = "Sales"
            && fctArtikelposten[Posting_Date] >= [last outputdate]
    )
)

 

Best Regards,

Jay

StefanH74
Frequent Visitor

problem seems to be in this date-filter. this measure also ignores the filter

 

test = CALCULATE(MIN(fctArtikelposten[Posting_Date]),FILTER(fctArtikelposten,fctArtikelposten[Posting_Date]>=[last outputdate]))
 or
test2 = MINX(CALCULATETABLE(fctArtikelposten,FILTER(fctArtikelposten,fctArtikelposten[Posting_Date]>=[last outputdate])),fctArtikelposten[Posting_Date])
 
I'd love to hear it if somebody has an idea what I'm doing wrong.

ok, I found that the problem lies somewhere in the "last outputdate" - measure

because if I put in a hard value in measure 2, then it works correctly

 

test = CALCULATE(MIN(fctArtikelposten[Posting_Date]),FILTER(fctArtikelposten,fctArtikelposten[Posting_Date]>=43830))

 

This will give me the first date there was activity on an article after 31-12-2019 (=43830)

 

still no idea on how to fix it though, or why it wont accept the "last outputdate" instead

@StefanH74 
Perfect. Good job!

tamerj1
Super User
Super User

Hi @StefanH74 

please try

2ndMeasure =
CALCULATE (
    CALCULATE (
        MIN ( fctArtikelposten[Posting_Date] ),
        fctArtikelposten[Entry_Type] = "Sales"
    ),
    FILTER ( fctArtikelposten, fctArtikelposten[Posting_Date] >= [last outputdate] )
)

This does indeed remove the PLACEHOLDER error, only the measure is wrong, it returns the very first sales date, not the first after the last output-date. I looks like it doesnt apply the last filter:

FILTER ( fctArtikelposten, fctArtikelposten[Posting_Date] >= [last outputdate] 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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