Skip to main content

App Development

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

cancel
Showing results for 
Search instead for 
Did you mean: 
sharu055
Contributor III
Contributor III

Need rolling 6 week data in bar chart with sum of amount

Hi,

I am having 3 column, Amount date and week,

Need rolling 6 week data from max of week in bar chart, which  sum of amount  over date in qlikview.

please help

 

Amount      Date     Week

12000         Apr 7      18

26000          Apr 7     18

16000         Apr 14     19

6000            Apr 14    19

26000         Apr 21     20

6000            Apr 28    21

46000           May 4     22

12000          May 4       22

36000            May 11    23

16000          May 11       23

6000             May 18     24

21000            May 18    24

6000             May 25     25

46000           May 25        25

46000           Jun 1          26

Labels (1)
1 Solution

Accepted Solutions
sidhiq91
Specialist
Specialist

@sharu055  Please use the below expression to get the desired output.

Sum({<Week={">=$(=Max(Week)-6)<=$(=Max(Week))"} >}Amount).

If this resolves your issue, please like and accept it as a solution.

View solution in original post

4 Replies
EdgarOlmos
Contributor III
Contributor III

Hi

Here is an example of how the problem could be solved

=sum({$<WeekData = {">= $(vMinWeek) <= $(vMaxWeek)" } >} Amount)

Regards

sidhiq91
Specialist
Specialist

@sharu055  Please use the below expression to get the desired output.

Sum({<Week={">=$(=Max(Week)-6)<=$(=Max(Week))"} >}Amount).

If this resolves your issue, please like and accept it as a solution.

sharu055
Contributor III
Contributor III
Author

@sidhiq91  

 Could you please help to below question.

I have 3 columns in straight table. Team, Date, Result. Need the Sorting that Result column as primary sort that only only Won, Lost should appear as first and Tie, No  Result should come second and Date column should be as secondary sort  where  old dates should comes at first as ascending.  below are my input n needed output. please help

Input:

Team Date Result
IND 5/25/2022 Lost
CHI 5/15/2022 Tie
UK 4/22/2022 Lost
IND 4/31/2022 Won
UK 5/3/2022 No Result
USA 4/30/2022 Tie
CHI 5/31/2022 Won
USA 6/1/2022 No Result
UK 6/30/2022 Lost

 

After Sort Output need as below :

Team Date Result
UK 4/22/2022 Lost
IND 4/31/2022 Won
IND 5/25/2022 Lost
CHI 5/31/2022 Won
UK 6/30/2022 Lost
USA 4/30/2022 Tie
UK 5/3/2022 No Result
CHI 5/15/2022 Tie
USA 6/1/2022 No Result

 

Please help.

sidhiq91
Specialist
Specialist

@sharu055  Please see the expression below. I have sorted results using the expression mode,

i.e. Match(Result,'Won','Lost','Tie','No Result')

And then sorted date based on Ascending Order.

sidhiq91_0-1660193880233.png

 

Let me know if it has worked.