Forum Discussion

powerbiexpert22's avatar
powerbiexpert22
Impactful Individual
1 year ago
Solved

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 a...
  • bhanu_gautam's avatar
    1 year ago

    powerbiexpert22 ,  Try using below 

     

    Total orders offline =
    SUMX(
        VALUES('ORDERS'[ORDER_NUMBER]),
        IF(
            CALCULATE(
                COUNTROWS(PRODUCT),
                PRODUCT[CategoryType] = "Offline"
            ) > 0,
            1,
            0
        )
    )