Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good afternoon
I'm trying to generate a measure for a KPI
For this I am using 3 fields
1 Schedule
2 Window
3 Status
In the measure I need to count those elements that have the Pending Status and that the Window and Time difference is greater than 0 and less than 0.0313
Try to do it this way
Count ({$ <Status = {'PENDIENTE'}, [Window-Timetable] = {"> 0 <= 0.0313"}>} Status)
However, I am only managing to filter those that have Pending Status, I do not know if the problem is how I am defining the difference between Window and Schedule
The 0.0313 I define it as time difference, for example [20: 00-19: 30]
Hi,
try using interval for the difference between two hours and do it in the script like this:
load*,
interval (Window-Timetable) as Difference.
Then you must check the differences using a table.
If the result is right you can do the formula:
Count ({$ <Status = {'PENDIENTE'}, [Difference] = {"> 0 <= 0.0313"}>} Status)
I think you can't use set analysis if you don't pre-calculate the difference
Bye
Maybe this?
=count(if(Status = 'PENDIENTE', if((Window-Timetable ) > 0,if((Window-Timetable )<= 0.0313,Status))))
Try this:
if((Window-Timetable ) > 0 and (Window-Timetable )<= 0.0313, Count ({$ <Status = {'PENDIENTE'}>} Status))
Thank you very much for the reply
I have already managed to generate my KPI
Many thanks
Can you mark the most useful suggestion, please?
Hi,
You should create a dimension [Window-Timetable] in the script, so that you can use it directly.