Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I need to make this expression in my dinamic table and I'm not finding the right way:
sum (if(weekday(yesterday)='sun',{1<Date={'$(DateYesterday2)'}, Company={'ADBR'}>}, {1<Date={'$(DateYesterday1)'}, Company={'ADBR'}>} Quantity)
Anyone can give me a hint?
This expression works:
sum ({1<Date={'$(DateYesterday2)'}, Company={'ADBR'}>} Quantity)
Thanks
You can also just put 2 seperate expression using the if:
if(weekday(yesterday)='sun',
sum ({1<Date={'$(DateYesterday2)'}, Company={'ADBR'}>} Quantity),
sum({1<Date={'$(DateYesterday1)'}, Company={'ADBR'}>}Quantity))
Or you can just create one variable that uses the same if statement:
DateYesterday=if(weekday(yesterday)='sun','Expression','Expression2')
Then do:
sum({1<Date={'$(DateYesterday)'}, Company={'ADBR'}>}Quantity))
It doesn't appear to be working that way on my end either, a possible workaround might be to define two variables
var1 = sum ({1<Date={'$(DateYesterday2)'}, Company={'ADBR'}>} Quantity)
var2 = sum ({1<Date={'$(DateYesterday1)'}, Company={'ADBR'}>} Quantity)
Then you can just do if(weekday(yesterday)='sun',var1, var2) in your table.
Hope this helps.
You can also just put 2 seperate expression using the if:
if(weekday(yesterday)='sun',
sum ({1<Date={'$(DateYesterday2)'}, Company={'ADBR'}>} Quantity),
sum({1<Date={'$(DateYesterday1)'}, Company={'ADBR'}>}Quantity))
Or you can just create one variable that uses the same if statement:
DateYesterday=if(weekday(yesterday)='sun','Expression','Expression2')
Then do:
sum({1<Date={'$(DateYesterday)'}, Company={'ADBR'}>}Quantity))
Hi,
Check with this
if(weekday(yesterday)='sun',sum ({1<Date={'$(DateYesterday2)'}, Company={'ADBR'}>} Quantity), Sum({1<Date={'$(DateYesterday1)'}, Company={'ADBR'}>} Quantity))
Celambarasan
Hi,
Qlikview is case sensitive, so 'sun' should be 'Sun', and your expression should be like below
= if(WeekDay(yesterday)='Sun', Sum ({1<Date={'$(DateYesterday2)'}, Company={'ADBR'}>} Quantity), Sum({1<Date={'$(DateYesterday1)'}, Company={'ADBR'}>} Quantity))
Regards,
Jagan.