Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
qlik_sense_user
Contributor
Contributor

Find the change in a data set, in a selection

I have a data field that is constantly increasing with time. In my app I want the user to be able to see the total difference over the time period she has selected.

I can easily achieve this by substracting the minimum value from the maximum value if the selected time period is compact, however, if the user selects lets say: Monday and Wednesday, this method will break.

In this case, I would want to calculate the difference that occurred only on Monday and Wednesday.
Currently I created a workaround by calculating the difference for each day, and I store them in a separate table, however, this slows down the app because numerous synthetic keys are created.
How could I achieve this *without* creating a separate table?

Labels (2)
2 Replies
QFabian
MVP
MVP

HI @qlik_sense_user ,  is you hace a date field, you can use it as a filter, then, if you select one or more values from this field, the expressions 'min(Date)' and 'max(Date)' , re still working, even if you select in another field like 'Weekday', is that what you said?

 

Greetings!! Fabián Quezada (QFabian)
did it work for you? give like and mark the solution as accepted.
qlik_sense_user
Contributor
Contributor
Author

Hi @QFabian , thank you for your reply!

Expressions are working properly, my problem is that they don't yield the result I need. 

So let's say I have a total income field that stores the total income of a shop in a fiscal year, and I have a new data every hour. However, the user needs to select periods of time, and see the income in that period. For example, if they select Monday and Wednesday, I need to show the sum of the incomes on Monday and Wednesday.

If I would do this this with MAX([Total income])-MIN([Total income]) this would include Tuesday as well, which is undesired.