cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

New Member

## "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
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()))

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 )``````

Announcements

#### Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.