The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi
I am creating dax measures to count records by id and wondering if it is possible to use a filer similar to not in to exclude a list of ids.
See below an example of one of the dax measures that works for me where I am counting the number of product ids where the status id is 39.
Sales = calculate(Count('Status Records' [product_id]) , 'Status Records'[Status_ID] = 39)
I need to do similar to the above , however I need to count the number of product ids for all statuses that are not (89,74,32)
Anyone able to assist ?
Solved! Go to Solution.
@Arranafc19 , Try like
Sales = calculate(Count('Status Records' [product_id]) , not('Status Records'[Status_ID] in {89,74,32}))
Hi @Arranafc19
I believe below thread could provide you hints:
https://community.powerbi.com/t5/Desktop/DAX-equivalent-of-SQL-s-NOT-IN/m-p/586184
MEASURE NOT IN =
CALCULATE (
SUM ( Table1[Value] );
FILTER (
Table1;
Table1[Category] = "C"
&& NOT ( Table1[CAT LEVEL] ) IN { 2; 3 }
)
)
Hi @Arranafc19
I believe below thread could provide you hints:
https://community.powerbi.com/t5/Desktop/DAX-equivalent-of-SQL-s-NOT-IN/m-p/586184
MEASURE NOT IN =
CALCULATE (
SUM ( Table1[Value] );
FILTER (
Table1;
Table1[Category] = "C"
&& NOT ( Table1[CAT LEVEL] ) IN { 2; 3 }
)
)
@Arranafc19 , Try like
Sales = calculate(Count('Status Records' [product_id]) , not('Status Records'[Status_ID] in {89,74,32}))