Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Dynamic Dimensions using IF()

Hi,

          I am new to qlikview, I was trying to create a dashboard where i created a Dimension table using Inline load.

now my entire dash board should be dynamic to the user.

i.e. IF the user select's Store it should show the Store details in the KPI

if the user selects Customer it should show the Customer details in the KPI else it should be the total value.

I have 2 different Dimensions i.e state

1.CustomerState

2.StoreState

i used Calculated dimensions

     IF(

          Dimentions='Store','StoreState',

     If(

          Dimentions='Customer','CustomerState',

         ))

Now how to combine both the states inorder to see the total

plz help guys...

Thanks in Advance

6 Replies
Not applicable
Author

Check the attached QVW. Not sure if this your requirement. If not, please provide a sample file which are working on

Regards,

Rakesh

Not applicable
Author

the dimention.bmp

Not applicable
Author

hi

try apply to Enable Conditional

for CustomerState

SubStringCount(Concat(FieldName, '|'),'Costumer')

for StoreState

SubStringCount(Concat(FieldName, '|'),'Store')

Regards

Gernan

Not applicable
Author

hi Gernan,

I tried that but for default it should show the total data right its not Coming

Not applicable
Author

Hi,

Perhaps sth like:

1) create a variable that will be populated with Customer State, Store State or Null according to the Dimentions chosen

2) The dimension of the chart will appear if that variable is not NULL (Dimension tab, Enable Condition)

3) Expression

if(variable is null, sum(VALUE), aggr(VALUE, $Dimentions or $TheVariable  [I do not know what are the field name])

Fabrice

Not applicable
Author

thank you Fabrice Let me give it a try