Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Using Slowly Changing Dimension

Hello!

I have a small issue, I have a table like:

SEC     INFO     MEA

001     AAA      1

001     BBB      2

001     CCC      3

002     AAA      4

002     BBB      4

So based on the SEC I want to replace the value of INFO so the new associated value of AAA will be 4 instead of 1 and for BBB will be 4 instead of 2.

Any ideas guys?

Thanks.

8 Replies
Anonymous
Not applicable
Author

Hi

Does the attached give you food for thought ?

Best Regards,     Bill

Not applicable
Author

I'm sorry Bill, but which attached are you talking about?

Not applicable
Author

Hi Bill,

Currently we are using Personal Edition, I am not open the QVW document, please share the script above query.


Regards,

Raja.

iktrayanov
Creator III
Creator III

Here is the script out of Bill's document

He created calculated dimension SEC

=if ( aggr( rank(SEC*1) , INFO, SEC ) = 1 , SEC )

second dimension is INFO

and his expression is MEA

= only(MEA)

iktrayanov
Creator III
Creator III

I will try something like

Temp:

Load

max(SEC)

group by SEC

from YourTable;

inner join (Temp)

Load

SEC,

MEA

From YourTable;

and then use this temp table to replace the MEA values.

iktrayanov
Creator III
Creator III

Sorry the group by should be

Group by SEC, INFO

Not applicable
Author

Thanks IVAN Trayanov.

Not applicable
Author

Hey Bill Thanks for your response but is it anyway it can acheived with Where Exists clause?