About DATEADD, comparison with previous month when there is a single month filter

Asked

Viewed 466 times

0

I have the following situation as shown below.

I want to make an individual analysis of the month, so every month that not selected are with filter 'off' and this makes my measurement with value:

inserir a descrição da imagem aqui

Valor Orçado D-1 = CALCULATE([Valor Orçado];DATEADD(BaseCalendario[Início do Mês];-1;MONTH)) always have empty value.

The location marked with Value Executed D-1 was to show the cost executed of Right Passage of the previous month. in the same way as the following image (made in Xel) does:

inserir a descrição da imagem aqui

Do you have a way to keep my report single month filter and display the value of the previous month?

1 answer

0


Have you tried using the function PREVIOUSMONTH() ?

Valor_Orçado_M-1 = 
                   CALCULATE(
                             [Valor Orçado]; 
                             PREVIOUSMONTH(BaseCalendario[Data])
                             )

Are you also using a date column for the relation? Example: 01/01/2019.

It’s good you always use formatted date and have a Calendar dimension.

  • 1

    With this job worked, thank you Gabriel!

Browser other questions tagged

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