Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic Filters based on multiple and dynamic fields

Hi,

We are developing a BI for a database where data from different customers is stored with a different structure:

Ex.

Client1:

Name, Country, Age

Client2:

FirstName, ZipCode, CountryCode

and new clients can appear at anytime so the QV we must develop has to be 100% regarding field naming convention...

Facts Data is stored in the same tables for everybody so that's not a problem..

The thing is that we want to add dynamic Filters in our document regarding the Client, so for example, if Client 1 is connected, we should display Name,Country and Age list fields in order to filter data.

If tomorrow a new Client appears, (Client3) with a whole new structure , the BI should be prepared for that ..

Any hint?

Thanks!!

2 Replies
MK_QSL
MVP
MVP

Provide few lines sample along with the output you are expecting..

would like to help you on the same...

Not applicable
Author

Hi, thanks for you reply, what kind of extra info would you need? I've added INLINE script at the bottom

It's more an interface problem as the charts will be the same for everybody but for Client 1, I would like to display automatically   Name, Country, Age  filters and for Client 2, none of the previous filters should appear and only FirstName, ZipCode, CountryCode will be displayed.

And also, this should work for new clients which can appear at any moment with a whole new field structure regarding an specific table. (Clients table will always have ClientId and RecipientId but the rest of fields can change completely ...)

Regards,

Operation:

LOAD * INLINE [

    ClientId, OperationId, RecipientId, Result

    1, 1, 1,  Opened

    1, 2, 2,  Opened

    1, 3, 3, Not Opened

    2, 4, 1, Opened

    2, 5, 2, Not Opened

    2, 6, 3, Opened   

];

RecipientsClient1:

LOAD * INLINE [

    Prenom, Nom, F/H, Age, Ville, RecipientId, Age Group,ClientId

     Yves, Montand, Homme, 34, Nice, 1 , 25-50,1

     Patrick, Bruel, Homme, 22, Bordeaux, 2, 0-25,1

     Marie, Laforet, Femme, 76, Paris, 3 , 75-100,1

  

];

RecipientsClient2:

LOAD * INLINE [

    Nombre, Apellidos, Genero, Edad, Ciudad, RecipientId, Grupo Edad,ClientId

     Julien, Clerc, Homme, 85, Paris, 1 , 75-100,2

     Alain , Souchon, Homme, 67, Montpellier, 2 , 50-75,2

     Charles , Aznavour, Homme, 87, Montpellier, 3 , 75-100,2

  

];

I display BarChart where Dimension = Operation.Result  and Expression = Count(RecipientId)

I filter always by Client1 OR Client2  as users can only display data for the Client they belong