Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm struggling to make my set analysis expression to work. I'm trying to get the total time where ordernumber is equals to the choosen ordernumber on my filter pane and requestdescription is not blank. Here's my code:
sum ({1<[OrderNumber]=P({$<[OrderNumber]={"if(len(trim([RequestDescription]))>0,
[OrderNumber])"}>}[OrderNumber])>}
num#((Interval([StpDate]-[StrtDate], 'ss'))/60/60))
Appreciate any inputs or suggestions... Thanks in advance. -sv
May be this:
Sum({1<[OrderNumber]=P([OrderNumber]) * {"=Len(Trim(RequestDescription)) > 0"}>} Num#((Interval([StpDate]-[StrtDate], 'ss'))/60/60))
Can you try this:
Sum({1<[OrderNumber]=P([OrderNumber])>} Num#((Interval([StpDate]-[StrtDate], 'ss'))/60/60))
or
Sum({1<[OrderNumber] = $::[OrderNumber])>} Num#((Interval([StpDate]-[StrtDate], 'ss'))/60/60))
Hi Sunny,
Thanks for the quick response. Yes, I tried it and its working but I also need to check on the "RequestDescription" if its not blank then I could add the date and get the sum for it.
Actually here's my previous code that was working just need to add the check for the "RequestDescription"...
sum ({1<[OrderNumber]=P({$}[OrderNumber])>}
num#((Interval([StpDate]-[StrtDate], 'ss'))/60/60))
-sv
May be this:
Sum({1<[OrderNumber]=P([OrderNumber]) * {"=Len(Trim(RequestDescription)) > 0"}>} Num#((Interval([StpDate]-[StrtDate], 'ss'))/60/60))
Hi Sunny,
Here's what I did and it worked:
sum ({1<[OrderNumber]=P({$<"if(len(trim([RequestDescription]))>0, [OrderNumber])">})>}
num#((Interval([StpDate]-[StrtDate], 'ss')))/60/60)
I think your code will also work.Really appreciate your help.
Cheers -sv
He could also create a Flag in the script for checking for Null or empty values in the SA
Great, if you got what you were looking for, I would suggest closing this thread by marking correct and helpful responses.
Qlik Community Tip: Marking Replies as Correct or Helpful
Best,
Sunny