Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
Could Qliksense regonized the number 20181201 as Year 2018 Month 12 and Week 1?
Is there any ways to do that?
Use these then,
Current Period: Sum({<Month={"$(=MonthName(Max(Month)))"},Week={"$(=Max(Week))"}>} Sales) Previous Period: If(Max({<Year={'$(=Max(Year))'},Month={"$(=MonthName(Max(Month)))"}>}Week)=2, Sum({<Month={"$(=MonthName(Max(Month)))"},Week={"$(=Max(Week)-1)"}>} Sales), Sum({<Month={"$(=MonthName(AddMonths(Max(Month),-1)))"},Week={"$(=Max(Week))"}>} Sales))
HTH,
Hirish
Hi @HirisH_V7 ,
Thanks again.
For the current Period work well.
For the previous Period doesn't work correctly.
If i select 20190101 it is showing 20181201 sales figure.
It is supposed to show 20181202 sales figure.
Hello I have revamped some code it will be straight.
Hope it serves u r purpose well.
Date: LOAD * INLINE [ Format, Sales 20181201, 2222 20181202, 22522 20190101, 3333 20190102, 33353 20190102, 545544 ]; Sort: Load distinct Format,AutoNumber(Format) as Sort Resident Date Order by Format;
Current: Sum({<Sort={"$(=(Max(Sort)))"}>} Sales) Previous: Sum({1<Sort={"$(=(Max(Sort)-1))"}>} Sales)
PFA For ref.
No Problem!
Happy Qliking. 🙂