Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Current Month vs Previous Month

Hi guys! I have a doubt.

I have this filter:

Filtros.png

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.

all.png

The sentence to get Current Month is :

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

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:

Fields.png

Fields1.png

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

17 Replies
william_fu
Creator II
Creator II

Try this instead:


1-(sum({<Disponibilidad={'NO'},[Disp.DeviceName]={'FW_PAITA(.1)'}, Disp.FechaCaida={'>=$(=MonthStart(Max(Disp.FechaCaida),-1))<=$(=MonthEnd(Max(Disp.FechaCaida),-1))'}>} [Disp.Minutos])/(24*31*60))

Anonymous
Not applicable
Author

It doesn't work

william_fu
Creator II
Creator II

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

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

Anonymous
Not applicable
Author

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

fechacomun.png

william_fu
Creator II
Creator II

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?

Anonymous
Not applicable
Author

Nothing

monthstart.png

william_fu
Creator II
Creator II

Okay.. what about these:


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

or just

=Max(Disp.FechaCaida)

william_fu
Creator II
Creator II

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

Anonymous
Not applicable
Author

Nothing either, but it works with FechaComun

fechacomunv1.png