Forum Discussion
powerbiexpert22
1 year agoImpactful Individual
arithmetic operation error
if i use below measure in table visual then i am getting below error . i am usng direct query
if i remove distinctcount() from measure then it works fine and does not give any error . is there any alternative for implementing this measure to avoid this error?
measure =
Total orders offline =
CALCULATE(DISTINCTCOUNT('ORDERS'[ORDER_NUMBER]),FILTER(PRODUCT,
PRODUCT[CategoryType]="Offline"))
powerbiexpert22 , Try using below
Total orders offline =SUMX(VALUES('ORDERS'[ORDER_NUMBER]),IF(CALCULATE(COUNTROWS(PRODUCT),PRODUCT[CategoryType] = "Offline") > 0,1,0))
2 Replies
- bhanu_gautamSuper User
powerbiexpert22 , Try using below
Total orders offline =SUMX(VALUES('ORDERS'[ORDER_NUMBER]),IF(CALCULATE(COUNTROWS(PRODUCT),PRODUCT[CategoryType] = "Offline") > 0,1,0))- powerbiexpert22Impactful Individual
thanks bhanu_gautam