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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
Anonymous
Not applicable

"PLACEHOLDER" function error

Hey! I`m trying to create new measure:

Frod_fo = CALCULATE(COUNTROWS('orders'), AND('orders'[order_number] = 1, 'orders'[Frod_all] = TRUE()))
 
where 'orders'[order_number] is a column 
orders'[Frod_all] is a measure
 
and I need count of frod first orders
but I get error: A function 'PLACEHOLDER' has been used in a True/False expression that is used as a table filter expression. This is not allowed. 

what can I do?
2 REPLIES 2
Ahmedx
Super User
Super User

pls try this
Frod_fo = CALCULATE(COUNTROWS('orders'),
FILTER(ALL('orders'), AND('orders'[order_number] = 1, [Frod_all] = TRUE())))
----- or ----Frod_fo = CALCULATE(COUNTROWS('orders'),
FILTER(ALL('orders'), 'orders'[order_number] = 1&& [Frod_all] = TRUE()))

jdbuchanan71
Super User
Super User

Using a measure in another measure as a filter can be tricky.  We need to build the list of order_number that match the criteria [@FrodAll] = TRUE() then use that list as a filter in your CALCUALTE:

Frod_fo =
VAR _List =
    FILTER (
        ADDCOLUMNS ( VALUES ( 'orders'[order_number] ), "@FrodAll", [Frod_all] ),
        [@FrodAll] = TRUE ()
    )
RETURN
    CALCULATE ( COUNTROWS ( 'orders' ), 'orders'[order_number] = 1, _List )

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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