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

Select Dimension by Condition

Hi,

I have a question, i have a data like this:

Name          ValueUSD         ValueSGD

A                       1                        2

B                       3                        4

I want to create a straight table and show the value according to my selection. I have a list box that contain USD and SGD. When I select USD so the 'ValueUSD' field will show and when i select SGD, so the 'ValueSGD' field will show. I've try using calculated dimension and use if for the condition. It works perfectly, but the problem is I have hundreds of million data, if i am using that method it will take time and the application will be run slower. Are there another method to optimize loading time ?

Really appreciate your help.

Thanks

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

Hi indra1705

Already I tried the same method (I have also 100 millions record), it works faster.

if we use the conditional display, first it will check that(true or false), then only the expression will be evaluated.

View solution in original post

7 Replies
vardhancse
Specialist III
Specialist III

use conditional expression for the dimension:

SubStringCount('|'&Concat([% USD],'|')&'|','|USD|')

settu_periasamy
Master III
Master III

Hi,

Have you tried the conditional based display like the below screen shot?Capture.JPG

Not applicable
Author

Any specific reason for using those as dimensions? Not a good idea to use any field having hundreds of millions of rows as dimension. Use them in the expression with appropriate aggregation as mentioned by settu_periasamy‌ . And enable always one selected value for the list box to select either USD or SGD for the above condition to work.

Regards,

KKR

Not applicable
Author

Hi Sasi and Settu,

Thanks for your comments, do you know which method is faster to be processed in qlikview ? because i have hundreds of million data.

Thanks

Not applicable
Author

Hi Kran,

Thanks for your suggestion, so Settu's method will be faster ? Can u give me the reason why ?

Ok then, i'll try. Thanks once again for your comment.

settu_periasamy
Master III
Master III

Hi indra1705

Already I tried the same method (I have also 100 millions record), it works faster.

if we use the conditional display, first it will check that(true or false), then only the expression will be evaluated.

Not applicable
Author

I see,

Ok then, i'll try your suggestion. Thanks Settu