Announcements
Applications are open for the 2024 Qlik Luminary Program. Apply by December 15 here.
cancel
Showing results for
Did you mean:
Partner - Specialist

## how to apply selection from Month to Date field

Hello guys,

I have a really big analysis, with a lot of expressions with set analysis( around 150 expressions).

So using this when the user selects date it gives him the previous month's or year results.

BUT, if the user selects a week, for example week number 26, or a month, for example June, the set analysis don't work. I know I can make set analysis based on week, for example if week number 26 is selected, the previous one is shown, but this will require a lot of time to add all these set analysis, and the application will grow with above 300 master measures.

In qlikview, I have surpassed this using triggers, but I don't know how to do this in Qlik Sense .

Question:

When the week number 26 is selected, the dates corresponding to this week, have to be automatically selected.

How to achieve this in Qlik Sense?

Best regards,

Angel Tomov

1 Solution

Accepted Solutions
MVP

Yes, please, put them before ur date condition; I mean:

Try it and tell me if it works

5 Replies
Master II

MVP

u'll have to add week, in ur set analysis.

becasue when u select a week, qlik will only see that week, so he would not be able to revert back to the previous year..

as shahbaz suggested, this will work:

u also need to add the other date filed u might use in ur selections

Partner - Specialist
Author

Okay my friend, thank you for the detailed description
So if i make like this Sum({<Date = {">=\$(=AddMonths(Min(Date), -1))<=\$(=AddMonths(Max(Date), -1))"}, Week,Month>}SoldQuantity)

Even if the user selects Month, it will show him LAST month sales, right?

MVP

Yes, please, put them before ur date condition; I mean:

Try it and tell me if it works

Partner - Specialist
Author

Lets say it works man 😉

Thanks

The problem is lying in my inside expression which is Addmonths(min(date) -1)

Because, if July has started in 02.07 and  ended on 30.07
and june starts in 01.06 and ends on 31.06, my formula will not catch calculations from 31, because its not the max date..

I will think of other solutions for this but Thank you again I understand why it works in your way
Greetings and thanks again

Tags
Community Browser