Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis - dimension as condition and loading dimension with constant

Hi,

I was searching for the sollution on the forum but I could not find the answeres for those - relatively easy issues:

1. I load .txt files to QV, but would like to have as well a dimension containing constant (the data type used in QV formulas). I was trying to use :

     Set Data_Type = 'TGT-2012'

but this formula does not work. My current solution is to load 'TGT-2012 in Data_Type dimension via Load inline but I am sure it is more elegant solution

2. I would like to use this Data_Type dimension (containing string 'TGT-2012') in set analysis as the condition. I was trying:

sum( {$<Report_Type = Data_Type >} Quantity)  or

sum( {$<Report_Type = {"Data_Type"} >} Quantity)

but this does not work. Could you please advise me how to use this Data_Type dimension in the condition?

Thanks in advance

7 Replies
Not applicable
Author

Hi,

Anyone?

//draszor

Not applicable
Author

Hi,

Question 2 I have answered by trying different ways, maybe it is helpful to someone. If you need to use another dimension in the set analysis condition, the syntax is the following:

sum( {$<Report_Type = {'$(=RT_1)'}>} Quantity)

where RT_1 is a dimension

Not applicable
Author

draszor wrote:

1. I load .txt files to QV, but would like to have as well a dimension containing constant (the data type used in QV formulas). I was trying to use :

     Set Data_Type = 'TGT-2012'

but this formula does not work. My current solution is to load 'TGT-2012 in Data_Type dimension via Load inline but I am sure it is more elegant solution

If you create a text object and set its value to =Data_Type, does it show TGT-2012? I tried this and it worked; I could see TGT-2012 in a text object.

Not applicable
Author

Q1: If I'm not missing the point, the code will go as below:

LOAD

     Dim_1,

     Dim_2,

     'TGT-2012' AS Type

FROM Path\Test.txt

(txt, codepage is 1250, embedded labels, delimiter is ',', msq);

Pozdrowienia z Wrocławia 🙂

Not applicable
Author

No witam Pana,

Widze z profile że ostro działasz w temacie QV (tak przyrównując do mojej działalności ) czyżby związane to było z pracą czy też rozwojem prywatnych zainteresowań?

//robert

Not applicable
Author

Świat się digitalizuje, trzeba to jakoś ogarnąć, a czym lepiej jak nie QV?! Więc dzióbie w pracy, dzióbię po pracy, może coś wydzióbię 🙂

Pozdrawiam,

Przemek

Not applicable
Author

Podałbys jakiegoś maila bo chyba nie umiem go zczytać z Twojego profile..

//RSz