17 Replies Latest reply: Sep 10, 2018 3:44 PM by William Fu

# Current Month vs Previous Month

Hi guys! I have a doubt.

I have this filter:

It shows me year and Month. Now, I put on this filter : Year 2018 and Month July .

Also, I have 2 KPI. Current Month and Previous Month.

Current Month shows percentage of disponibility of a service from. And Previous Month has to show me percentage of previous month (June ) but my code is not working.

The sentence to get Current Month is :

Previous Month is:

1-(Sum({  \$< Disp.Num_Fecha = {  \$(=Max(Disp.Num_Fecha) - 1)},Disponibilidad={'NO'},[Disp.DeviceName]={'FW_PAITA(.1)'}>}[Disp.Minutos])/(24*31*60))

I have this fields:

I used that sentence to previous Month on different sheets(with different data) in the same app and it work it, I don't know why it doesnt work in this sheet.

Thankss

• ###### Re: Current Month vs Previous Month

It doesn't work

• ###### Re: Current Month vs Previous Month

What's the column you're supposed to filter?

You have FechaComun on your filter panes, but Dist.FechaCaida on your table

• ###### Re: Current Month vs Previous Month

FechaComun is the name of asociation between Disp.FechaCaida and other field from another data.

• ###### Re: Current Month vs Previous Month

Try using just these formulas in a KPI object while you have 2018 and July filtered

=MonthStart(Max(Disp.FechaCaida),-1))

=MonthStart(Max(FechaComun),-1))

What do you get as a result?

• ###### Re: Current Month vs Previous Month

Nothing

• ###### Re: Current Month vs Previous Month

=Monthstart(Date(Max(Disp.FechaCaida)),-1)

or just

=Max(Disp.FechaCaida)

• ###### Re: Current Month vs Previous Month

Nothing either, but it works with FechaComun

• ###### Re: Current Month vs Previous Month

Ok, just use the same formula I originally suggested replacing Disp.FechaCaida for FechaComun then?

• ###### Re: Current Month vs Previous Month

Nothing

I used this:

• ###### Re: Current Month vs Previous Month

You're missing an equal sign highlighted above.

• ###### Re: Current Month vs Previous Month

It shows just "1", so all the function sum is 0, but it is not right. it has to show me 0.11 , then 1-0.11= 0.99

• ###### Re: Current Month vs Previous Month

I messed up the syntax, there's an extra parentheses you have to delete on those

• ###### Re: Current Month vs Previous Month

It works with =MonthStart(Max(FechaComun),-1)

• ###### Re: Current Month vs Previous Month

Did you cleared the issue, post the solution.

• ###### Re: Current Month vs Previous Month

Hi, sorry for the time. I was too busy.

It is not worked yet :/