Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis - Date island

Hi,

I have created one date island table.

i have one transaction table...

i loaded the date island table fields like year,month,Qtr in list boxes.

in transaction table i have transyear,transmonth,transQtr fields.

i need to show the sum(sales) by customerwise.

if i used the transyear,transmonth,transQtr in list boxes, then i can write sum(sales) in expression tab,Customer as Dimension.

but i need to use the date island table fields...

could anyone hepl me how to write the expression...

due to restrictions i cant upload the sample file...

1 Solution

Accepted Solutions
stephencredmond
Luminary Alumni
Luminary Alumni

Hi,

Depending on what calculation you want it would look something like this:

Sum({$<Trans_Date=P({$} Island_Date)>} TransValue)

=> Total of values based on current selection in Data Island dates.

or

Sum({$<Trans_Date={"<=$(=Max(Island_Date))"}>} TransValue)

=> Total of all transactions up to an including the selected Island Date.

Regards,

Stephen

View solution in original post

5 Replies
stephencredmond
Luminary Alumni
Luminary Alumni

Hi,

Depending on what calculation you want it would look something like this:

Sum({$<Trans_Date=P({$} Island_Date)>} TransValue)

=> Total of values based on current selection in Data Island dates.

or

Sum({$<Trans_Date={"<=$(=Max(Island_Date))"}>} TransValue)

=> Total of all transactions up to an including the selected Island Date.

Regards,

Stephen

Not applicable
Author

Hi Stephen,

thank you very much...

u solved my big problem....

i will enjoy the week end...

Not applicable
Author

Hi

i need one more help...

i created one straight table by dimension as Customer

in expression i worte sum({<Month={Jan}>} sales) for jan,

sum({<Month={Feb}>}sales) for feb,

sum({<Month={Mar}>}sales) for Mar,

sum({<Qtr={Q1}>} for Q1,

sum({<Month={Apr}>}sales) for Apr,......

bcoz of the req i wrote separately for each month and Quarter....

if i select the month Apr then i need to show the value for only Apr month and Q2 remaining should be 0.

but in my case it shows the value for all the month...

could you help me....

stephencredmond
Luminary Alumni
Luminary Alumni

You could use an Intersection with the implicit operator:

Sum({<Month={'Feb'}*P()>} Sales)

Regards,

Stephen

Not applicable
Author

Hello,

I am trying to solve similar problem.

http://community.qlik.com/message/265898#265898

I would like to ask you, what "P" does mean?

Thank you!

Mirek