Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
Hi,
I have one issue to get count from measure for below scenario. Appreciate any help .
Threshold | <10 | <8 | >20 | >20 | |||
Group | Total Cost | No of item | Count of Item with no price | % of item with no price | Count of item with no lead time | % of item with no lead time | Include Indicator |
A | 20 | 7 | 1 | 14% | 2 | 29% | 0 |
B | 15 | 10 | 6 | 60% | 1 | 10% | 0 |
C | 31 | 16 | 0 | 0% | 2 | 13% | 1 |
D | 31 | 17 | 2 | 12% | 0 | 0% | 1 |
E | 20 | 17 | 5 | 29% | 0 | 0% | 0 |
F | 8 | 10 | 1 | 10% | 0 | 0% | 0 |
% of item with no price =sum(Table[Blank_Price])/COUNT(Table[Item])
% of item with no lead time=sum(Table[Blank_LT])/COUNT(Table[Item])
Include Indicator=if((Cost <10 || COUNT(Item)<8 || [% of item with no price > 0.195] || [% of item no lead time] > 0.195),0,1)
I try to get Item_Count_Include using below formula but get an error.
Item_Count_Include = CALCULATE(DISTINCTCOUNT(Table[Item], [Include_Ind] =1)
Warning -> A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
Thank in advanced any help.
You can't use measures in the logical expressions under CALCULATE ([Include_Ind] =1 is not allowed). You have to use FILTER. In FILTER you can use logical expressions with measures but have to remember about context transition. Filtering arguments to CALCULATE are ALWAYS tables. Please read about CALCULATE here https://dax.guide/calculate
Better still, please read this: Filter Arguments in CALCULATE - SQLBI
thank you for the explaination.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.
User | Count |
---|---|
13 | |
11 | |
9 | |
8 | |
8 |