Forum Discussion

dmvega's avatar
dmvega
Frequent Visitor
4 years ago
Solved

Help using CALCULATE and FILTER

Hello   I am trying to use a distinct count using CALCULATE and FILTER but for some reason is not working: Measure "$ Net Sales" is = Sales - Return and is working fine, but when I try to count ...
  • AlexisOlson's avatar
    AlexisOlson
    4 years ago

    Hmm. That's strange unless [Return] and [Sales] are measures too. (I was assuming they were columns.)

     

    If they are measures, then I'd recommend a different approach:

    #C Net =
    SUMX (
        DISTINCT ( 'Venta Neta'[SC_CODIGO] ),
        IF ( [Return] > [Sales], 1 )
    )