Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
On Demand Webinar: See Why Thousands of QlikView Users Have Switched to Qlik Sense. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewwizard
Master II
Master II

Dynamic data show with report format

Hi All,

I have created a report. But when I select the Quarter2 it should show Q1 and Q2 data.

Quarter3 it should show Q1 ,Q2 and Q3 data.

Quarter4 it should show Q1 ,Q2 ,Q3,Q4 data.

Please help.

Thanks in advance.Capture.JPG

1 Solution

Accepted Solutions
jagan
MVP & Luminary
MVP & Luminary

Hi,

Try like this

=Sum({<Year=, Quarter=, Month=,BillingDate={'>=$(=vStartDate)<=$(=vMaxDate)'}>}  Sales)

WHERE

vStartDate = YearStart(Max(BillingDate))

vMaxDate = Date(Max(BillingDate))


Hope this helps you.


Regards,

Jagan.

View solution in original post

10 Replies
alexandros17

Remove quarter from your dimension and add in your expression the condition (with set analysis)

{$ <Quarter = {'<=GetFieldSelections(quarter)'}>}

let me know

maxgro
MVP
MVP

=aggr(Sum({<Year=,Quarter={"<=$(=vMaxQtr)"}>}  Sal),EmpNo)

qlikviewwizard
Master II
Master II

Hi Alexandros17 ,

Kindly provide the app.

qlikviewwizard
Master II
Master II

Hi maxgro,

I used that formula. But it is showing only selected Quarter. But I want to show Qn consequently (Qn-1,Qn-2,..) for the selection of Qn.

Kindly provide the app.

Thanks in advance.

maxgro
MVP
MVP

I've just replaced your expression in your chart under problem with

=aggr(Sum({<Year=,Quarter={"<=$(=vMaxQtr)"}>}  Sal),EmpNo)

and this is the result

1.png

qlikviewwizard
Master II
Master II

Hi Massimo Grossi,

I can see only Quarter 4. But I need to show Q1,Q2,Q3,Q4 in the report as we have selected Q4.

Please provide the app.

Like This:

Capture.JPG

maxgro
MVP
MVP

I think a simple solution could be: 4 expression (as quarters are 4)


=aggr(Sum({<Quarter={1}>}  Sal),EmpNo)

...

...

=aggr(Sum({<Quarter={1,2,3,4}>}  Sal),EmpNo)

conditional show

for first expression max(Quarter)>=1

....

....

4th max(Quarter)>=4

alexandros17

Here it is

jagan
MVP & Luminary
MVP & Luminary

Hi,

Try like this

=Sum({<Year=, Quarter=, Month=,BillingDate={'>=$(=vStartDate)<=$(=vMaxDate)'}>}  Sales)

WHERE

vStartDate = YearStart(Max(BillingDate))

vMaxDate = Date(Max(BillingDate))


Hope this helps you.


Regards,

Jagan.

View solution in original post