Skip to main content
Announcements
Qlik Community Office Hours, March 20th. Former Talend Community users, ask your questions live. SIGN UP
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Two Listboxes always enable for all values

Hi Team,

I have two fields field1 having values 0,1,..6Million and field2 having values 0,1,2...10. It looks like:

Field1,Field2

10000,0

10001,2

10000,3

..

Here, Field1 may not have all values from 0 to 10. These two fields are put in listboxes, when we select field1 value the relevant values will be seen in listbox 2 and remaining would be disabled ( ex: 0,3 enabled for 10000 and remaining will be grayed out)

The goal is to have it enabled for all values and based on the field 2 value the average of all the values should be calculated for a measure.

EX: If we select 5 for 10000 the average(Sales) for 0,1,2,3,4,5 should be calculated although there may not be any value for 10000 with entry 5.

One thought is to have inline load but for 6M entries with 0 to 10 for each may consume huge time.

Please provide your suggestions.

Thanks,

SV

6 Replies
jonathandienst
Partner - Champion III
Partner - Champion III

I suggest that you upload a sample qvw file with representative data to make the problem easier to understand.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
nagarjuna_kotha
Partner - Specialist II
Partner - Specialist II

Can you share sample file?

-Nagarjuna

Not applicable
Author

sample.PNG

I am unable to add the attachment. Basically, ID1 contains 0 to 7000 records, ID2 has 0 to 12 and it will have associated price value for each row.

I want to have ID2 to be able to select even 2,5 or so on (from image)

I wanted to calculate sum(price) and cumulativesum(price) based on selection of ID2.

For Ex:  ID2, Price ->

0,100

1,200

2,300

If select 2, then it should sum as 100+200+300 in Running sum (Straight Table)

Not applicable
Author

sum( aggr( rangesum( above( sum( {$<ID2>}  Price),0,12) ),ID2)) but it gives incorrect result. I wanted to get based on ID1 selected value but it gives incorrect results.

Tried to use:

sum( aggr( rangesum( above( sum( {$<Month>}  Sales),0,12) ),Month))


Here, additionally I want to get not just from month but also on ID field selected value till specific month which we select

Anonymous
Not applicable
Author

Hi,

What I understand from all your explanation is that you want to ignore ID1 selection and calculate the SUM(Price) based on selection of ID2 and that too cumulative.

You may try below expression:

=Sum({<ID1=,ID2={$(=<max(ID2))}>}Price)

Not applicable
Author

Thanks prashant for your response. It dint work.

The thing is I want to see totals of accumulated till that month number but based on ID selection. It is giving me incorrect results when I applied

sum( aggr( rangesum( above( sum( {$<Month>}  Sales),0,12) ),Month))


Here it is just summing all the months but I have one more field which should consider even the selection of that field and show accumulated total till the month selected and id selected