Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I'm relatively new to Qlik and heard about Set Analysis.
It sounds like what I need as I have 2 parts to a calculation. The first part I do want to change with selections, the second part I don't. I believe it is in this second part where Set Analysis can come into play.
Here is my IF( statement for the 2nd part.
=sum(
if(Week>=today()-365,
if(Hrs>0,
ContractedHrs)))
Could someone please change this into a Set Analysis for me?
Thanks!
What are you trying to achieve with the below condition
Week>=today()-365
?
What is the definition (in script) of your field Week?
Assuming you are counting Week number when you load data such as Week = 1,2,3....
Try
Week>=Week(today()-365)
The term Today()-365 results in a numerical value of date.
For today (2/6/2020) the term Today()-365 is 43502
If either of the prior posts helped, please do not forget to return to that post and use the Accept as Solution button to mark it as the solution. This gives the poster credit and lets other Members know what worked.
Here is a Design Blog post on Set Analysis that should prove helpful, and there are further related links at the bottom of the post to other related posts, and I am putting the base URL to the Design blog after that for future reference, so you can search that area yourself for how-to items as there are over 700 posts in this area.
https://community.qlik.com/t5/Qlik-Design-Blog/A-Primer-on-Set-Analysis/ba-p/1468344
https://community.qlik.com/t5/Qlik-Design-Blog/bg-p/qlik-design-blog
Here is the Help link too, just in case:
Regards,
Brett
See duplicate posts: https://community.qlik.com/t5/forums/replypage/board-id/new-to-qlikview/message-id/385868
https://community.qlik.com/t5/QlikView-Scripting/Help-with-simple-Set-Analysis/m-p/1673037#M98209
Regards,
Brett