Forum Discussion

sukram1's avatar
sukram1
Frequent Visitor
3 years ago
Solved

Table as Filter in CALCULATE

Hello, first of all: the introduction takes a little longer, because I have to explain why we do what. We need to create a report at our company that needs to show 3 values each for multiple distri...
  • johnt75's avatar
    3 years ago

    You could try something like

    Distribution channel 1 total =
    VAR FilterTable =
        CALCULATETABLE (
            SUMMARIZE (
                'Filter table',
                'Filter table'[distribution channel],
                'Filter table'[segment],
                'Filter table'[product]
            ),
            'Filter table'[id] = 1
        )
    VAR Result =
        CALCULATE (
            [Sum],
            TREATAS (
                FilterTable,
                'Table'[distribution channel],
                'Table'[segment],
                'Table'[product]
            )
        )
    RETURN
        Result