Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Athira_S
Contributor
Contributor

Get Unique dates from Multiple columns ending in same substring

I have a set of columns in the data with column name ending in same string like

Column1_Date,Column2_date ..........

_date remains same in multiple column names and others columns exist in between.

I need to create a filter for dates with unique month from all the columns.

eg:

Column1_date    |  Column2_date

------------------------------------------------------

        Jan-20                |            Feb-20

        Feb-20                |            Apr 20

       Mar-20                 |            Jan-20

---------------------------------------------------

 

The filter  should contain all 4 months : 

filter

----------

Jan-20

Feb-20

Mar-20

Apr-20

Labels (2)
3 Replies
Taoufiq_Zarra

Maye be :

Data:
load * inline [
Column1_date,Column2_date
Jan-20,Feb-20
Feb-20,Apr 20
Mar-20 ,Jan-20
];


    FOR fieldno=1 TO NoOfFields('Data')

      fieldname = FieldName(fieldno,'Data');

    Filtre: load distinct filtre; LOAD $(fieldname) as filtre Resident Data;

    NEXT

 

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Athira_S
Contributor
Contributor
Author

I tried using this with data loaded from excel but not getting processed

Taoufiq_Zarra

can you share the excel sample ?

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉