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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

IF ELSE Statement in tMap

Hi everyone,

 

The field "revision" in the Output of the tMap component should be a counter, which depends on the three fields "T_SNR_SP", "T_SNR_SD" and "T_SNR_STAMM" from the Input. If there is a change in these three fields, the counter should begin at 1 again. It's like a groupchange.

0683p000009LsrP.png

 

In Java I would do it with a cache variable like these:

String T_SNR_SP_old = "";

String T_SNR_SD_old = "";

String T_SNR_STAMM_old ="";

for (int i = 1; T_SNR_SP_old==T_SNR_SP  && T_SNR_SD_old==T_SNR_SD && T_SNR_STAMM_old==T_SNR_STAMM; i ++){

          revision = i;

}

revision = 0;

T_SNR_SP_old = T_SNR_SP;

T_SNR_SD_old = T_SNR_SD;

T_SNR_STAMM_old = T_SNR_STAMM;

 

How can I do this in the tMap componente? I know, I could do this in the tJavaRow componente, but then I can't use the tMap component anymore.

Thanks Katharina

 

Labels (3)
1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Have a read of this tutorial and try to understand what is happening with the tMap variables. If you grasp this, you will easily be able to resolve your problem.....

 

https://www.rilhia.com/quicktips/quick-tip-compare-row-value-against-value-previous-row

View solution in original post

3 Replies
Anonymous
Not applicable
Author

Have a read of this tutorial and try to understand what is happening with the tMap variables. If you grasp this, you will easily be able to resolve your problem.....

 

https://www.rilhia.com/quicktips/quick-tip-compare-row-value-against-value-previous-row

vboppudi
Partner - Creator III
Partner - Creator III

Hi Katharina,

 

Are you looking for the following group id creation. Basically based on three attributes Col1,Col2 and Col3 group id will be created. If Any change in these three columns then group id will start from begin.

0683p000009Lt9D.png

 

Regards,

 

 

Anonymous
Not applicable
Author

Thanks, that solved my problem 0683p000009MACn.png