Power BI - measure only appear when currency is only one

Viewed 24

I'm struggling here, not sure of it's possible.

I need a measure where a sum will only appear if the currencies for that month are only one.

Example:

I have year, month, and sum.

2022 Jan has EUR and USD I don't want the SUM to show. Next, if february has only EUR I want the sum to show.

Does anyone know how to do this?

Thank you very much for any help.

1 Answers

what about this? The solution expect that year and month columns are filtered.

CALCULATE(SUM(table[value]);FILTER(table;COUNT(table[currency]) = 1)

It they are not, try this:

CALCULATE(
    SUM(table[value]),
    FILTER(
        SUMMARIZE(table,table[year],table[month],
        "Nr. Currencies",COUNT(table[currency])),
        [Nr. Currencies] = 1))
Related