Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am actually facing issue with week function in Qlik Sense.
I have written expression as below-
if( Week(today()) > Week(([Calendar day])),'Week' &' '&Week(([Calendar day])) &'('& Year(([Calendar day]))&')')
This should show me all weeks which is lesser than today, but it is just showing something like this.
Week 1(2020) | Week 1 (2019) | Week 1(2018) |
Note : Field [Calendar day] is a Date format in MM/DD/YYYY.
This was fine until Dec-2019 but now its is just showing Week 1 of 2020, 2019, 2018 ( as shown in table above)
Not sure how to proceed further.
Any help will be Appreciated !
Thanks
Hi
Try this
if(today() > ([Calendar day]),'Week' &' '&Week(([Calendar day])) &'('& Year(([Calendar day]))&')')
Thanks
Hi
Try this
if(today() > ([Calendar day]),'Week' &' '&Week(([Calendar day])) &'('& Year(([Calendar day]))&')')
Thanks
Thanks for the expression.
That works fine!
But I am not able to sort the row in descending order like shown below -
Week 2 (2020) | Week 1 (2020) | Week 53 (2019) | Week 52 (2019) | Week 51 (2019) | Week 50 (2019) | Week 49 (2019) | Week 48 (2019) | Week 47 (2019) | Week 46 (2019) |
All the columns are randomly sorts now, But I want to sort according to the table shown above.
I know that we need to changed in Sorting section but I tried by numeric and alphabets but was not successful.
Hi
Try this and sort numerically
if(today() > ([Calendar day]),dual('Week' &' '&Week(([Calendar day])) &'('& Year(([Calendar day]))&')',year([Calendar day])&num(Week(([Calendar day])),'00')))
Hope this helps
Thanks
Yes this is perfect.
Thanks Kashyap 🙂