Skip to main content
Announcements
Customer Spotlight: Discover what’s possible with embedded analytics Oct. 16 at 10:00 AM ET: REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
microwin88x
Creator III
Creator III

Solved

Solved

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

If I understand you right, then you could do something like this:

Filters:

LOAD INDICATOR & '|' & REGION & '|' & VERSION As Key

From Filter.xlsx

(ooxml, ....);

For i = 0 To NoOfRows('Filters')

    Let vKey = Peek('Key', i, 'Filters');

    TStore:

    NoConcatenate

    LOAD * Resident MAIN

    Where INDICATOR & '|' & REGION & '|' & VERSION = '$(vKey)';

   

    STORE TStore into File_$(i).qvd (qvd);

   

    DROP TABLE TStore;

Next


DROP Table Filters;

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

4 Replies
swuehl
MVP
MVP

Create a key like

LOAD

     INDICATOR & REGION & VERSION as KEY,

     ...

loading your Excel file.

Then

LOAD * FROM MAIN

WHERE EXISTS(KEY, INDICATOR & REGION & VERSION);

microwin88x
Creator III
Creator III
Author

The thing is that I believe that I would need to read the tables INDICATOR, REGION and VERSION multiple times. For example for table INDICATOR, 1st time I would filter by Sales and 2nd time by Margin. Or when I use the Where Exists I would automatically filter for all combinations from the Excel?

jonathandienst
Partner - Champion III
Partner - Champion III

If I understand you right, then you could do something like this:

Filters:

LOAD INDICATOR & '|' & REGION & '|' & VERSION As Key

From Filter.xlsx

(ooxml, ....);

For i = 0 To NoOfRows('Filters')

    Let vKey = Peek('Key', i, 'Filters');

    TStore:

    NoConcatenate

    LOAD * Resident MAIN

    Where INDICATOR & '|' & REGION & '|' & VERSION = '$(vKey)';

   

    STORE TStore into File_$(i).qvd (qvd);

   

    DROP TABLE TStore;

Next


DROP Table Filters;

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
swuehl
MVP
MVP

I don't think that you need to read the dimension tables multiple times.

You can load these tables after the MAIN table load and then use ...WHERE EXISTS(INDICATOR); etc. or do a LEFT KEEP (MAIN) LOAD for the dimension tables.