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

Announcements
Only at Qlik Connect! Guest keynote Jesse Cole shares his secrets for daring to be different. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
MindaugasBacius
Partner - Specialist III
Partner - Specialist III

Cannot properly connect data. Set analysis issue

Hei

There are two tables.

First table:

AmountDateKey
1002016-01-301
2002016-02-281
3002016-03-312
502016-04-302

Second table:

KeyDate2Value
12016-03-3010
12016-03-3120
12016-04-0130
22016-03-3015
22016-03-3125
22016-04-0135

  1. Pick up all Amount fields where Date <= 2016-03-31.
  2. Find the Date2 = 2016-03-31 and connect Value to the First table.
  3. Make aggregation Amount * Value.

I was struggling to accomplish this task by using Set analysis.

Please find the qvw.

Thank you!

17 Replies
MindaugasBacius
Partner - Specialist III
Partner - Specialist III
Author

Still cannot get it right.

I have modified the expression to:

=sum(Amount)/only({<Date = {"2016.03.31"}>} Value)

It do not calculate the Total value:

Screenshot_1.jpg

Total sum works while selecting the State:

Screenshot_2.jpg

How should I solve that?

Thank you in advance!

Kushal_Chawda

can you try this


sum(Amount)/Sum({<Date = {"2016.03.31"}>} Total <State>Value)

MindaugasBacius
Partner - Specialist III
Partner - Specialist III
Author

Unfortunately:

Screenshot_1.jpg

Kushal_Chawda

change total mode from "Expression total" to "Sum of Rows"

Kushal_Chawda

or try this

sum(Amount)/only({<Date = {"2016.03.31"}>} Total <State>Value)

MindaugasBacius
Partner - Specialist III
Partner - Specialist III
Author

kush141087


You're good at this!

Thank you for your time.

Kushal_Chawda

Not a problem

MindaugasBacius
Partner - Specialist III
Partner - Specialist III
Author

Screenshot_1.jpg

Both expressions return correct answers when changing from Expression Total to Sum of Rows.