Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Folks,
I'm using below exp in a Stacked bar chart:
=Sum({<Month=,Week=,Why_Name=,Standard_Name=,Area_Name=,Product_Name=,Variant_Name=,Reason_Name=>}Aggr(if(match(Line_Id,'124','116')
,sum({<Month=,Week=,Why_Name=,Standard_Name=,Area_Name=,Product_Name=,Variant_Name=,Reason_Name=>} ScheduledMinutes)+avg({<Month=,Week=,Why_Name=,Standard_Name=,Area_Name=,Product_Name=,Variant_Name=,Reason_Name=>}15),
sum({<Month=,Week=,Why_Name=,Standard_Name=,Area_Name=,Product_Name=,Variant_Name=,Reason_Name=>}ScheduledMinutes))/60,Station_Label,Reason_Planned_Downtime,Week))
Dimm are :
1. Week
2. Reason_Planned_Downtime
Currently , it is taking around 40-50 sec to load the chart , any suggestions to reduce the load time???
In general , what I'm trying is : if(match(Line_Id,'124','116'), ScheduledMinutes+15 ,ScheduledMinutes)/60
Thanks,
AS
Hi,
maybe replace the the if match inside the set analysis, like this:
{<...,Line_Id={'124','116'}>}
Hi,
Based on this "if" itself , we have two conditions , if I bring this within set the my expression is wrong.
Can u share full exp , what u meant?
Thanks,
AS
My bad, you're right.. didn't pay enough attention to the entire post
np
maybe Valuelist() function can help you
Aggr() is expensive to calculate. Do you really need it here? Did you try
if(match(Line_Id,'124','116'),
sum({<Month=,Week=,Why_Name=,Standard_Name=,Area_Name=,Product_Name=,Variant_Name=,Reason_Name=>} ScheduledMinutes) + 15,
sum({<Month=,Week=,Why_Name=,Standard_Name=,Area_Name=,Product_Name=,Variant_Name=,Reason_Name=>} ScheduledMinutes) / 60
)
Hi, Amit. Very interesting... try to test the expression in parts. Once I came across the fact that Pick() function in dimension and expression took several minutes and after replacing with simple IF(), everything was fine.
Hi Jonathan,
Yes, in starting I was using the same expression , but then I found if I'm using the same expression with Different Dimension like Station_Label or Reason_Planned_Downtime or Week different output , but when I used Aggr() results across all Charts was same.
Thanks,
AS
Hi Andrey,
Yes, my Aggr part is the issue , if I remove it than calculation is super fast.
Thanks,
AS