Do Not Show Blank Value with DAX

Asked

Viewed 148 times

0

Good morning guys, I’m trying to create a function on DAX that instead of showing the value Blank on my Dashboard, show the value 0. But my power bi are returning me the following error:

**`

The Expression refers to Multiple Columns. Multiple Columns cannot be converted to a scalar value

`**

I’m having trouble identifying what’s wrong with the expression. Could someone help me identify the problem?

Below is my DAX code

TotalGastosGlobo = VAR SOMA_GLOBO = FILTER(Gastos_Emissoras;Gastos_Emissoras[Emissora] = "Globo")
                    RETURN
                    IF(NOT(ISBLANK(SOMA_GLOBO));
                    SUMX(Gastos_Emissoras;Gastos_Emissoras[Total Geral - Governo Federal]);
                    0) 

1 answer

0


I managed to solve the problem with the help of a colleague here.

Follows solution:

GastosEmissoras = 
                   VAR SOMA = SUMx(Gastos_Emissoras;Gastos_Emissoras[Total Geral - Governo Federal])

                   RETURN
                     IF(ISBLANK(SOMA); 0; SOMA)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.