Forum Discussion

mloudenot's avatar
mloudenot
Regular Visitor
7 years ago
Solved

Help on DAX calculate/complex filtering on multiple columns

Hello, I am quite new to Powerpivot so please be kind :) I am trying to create a new metric "# Orders" with different filters: * on column "KPI", sum only the KPI called "# Orders" * filter OUT (...
  • Stachu's avatar
    7 years ago

    as far as I can tell the syntax is perfectly fine for what you're trying to achieve, with just 2 typos - you use

    'table 1' and later 'table1' (no space) - I assume this is actually the same table, correct?

    can you add sample 'table1' (in format that can be copied to PowerBI) from your model with anonymised data?

    Column1Column2
    A1
    B2.5

     

    you could rewrite measure like this, but the result is the same for me (I just used 'table1')

    Measure =
    CALCULATE (
        SUM ( 'table1'[Sum of Value] ),
        'table1'[KPI] = "# Orders",
        FILTER (
            'table1',
            'table1'[Is a partner order] <> 1
                || 'table1'[Flag partner] <> 1
        )
    )