Forum Discussion
dax help
hist units usa:=TRUNC(SUMX(product, product[historical_qty_usa])/[num distinct periods],2)
[all units usa] = CALCULATE([hist units usa],FILTER(all('date'[date_key]), 'date'[date_key]=max('date'[date_key])))
Now i want to create a measure like
[usa sku count] = calculate(count(product[sku]), [all units usa] >1)
error msg -
A function 'CALCULATE' has been used in a True/False expression that is used as a table filter expression. This is not allowed.
hope i am able to clear you the requirement.
Hi Anonymous
You can't use a measure inside a boolean expression that is used as filter expression. There are certain rules related to this
Refer to this: https://docs.microsoft.com/en-us/dax/calculate-function-dax
Apart from this your measure [usa sku count] = calculate(count(product[sku]), [all units usa] >1) doesn't refer any column which needs to be filtered.
- Anonymous6 years agoNot applicable
hi, i understand those rules about calculate function..but i am looking for a help or work around.
- Anonymous6 years agoNot applicable
Hi Anonymous can you share some sample data along with expected output and a clear description of the problem. Maybe then I can help you.
Thanks