Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
QlikWorld 2022, LIVE in Denver CO., May 16-19, 2022. REGISTER NOW TO RECEIVE EARLY BIRD PRICING
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 (3)
2 Replies
QFabian
Specialist II
Specialist II

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?

 

QFabian
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.