Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
The dynamic dimension name in chart Title is possible if you are using Alternate dimension in Qlik Sense?
Thanks,
Sandip Ghosh
Hi,
Thank you very much for your help. I just implement this using the below code:-
in Script:-
[Dimension]:
load * inline [
DimensionID, Dimension
1, Category
2, Country
3, City
];
and use 'Dimension' field as a filter drop down.
after that we need to use the below code at chart title:-
='Dimension By ' & ' ' & if(GetSelectedCount(Dimension) =0, 'Category', pick(match([DimensionID],'1','2','3'),
'Category',
'Country',
'City'
))
and in the dimension filed we need to use the below code:-
=if(GetSelectedCount(Dimension) =0, Category, pick(match([DimensionID],'1','2','3'),
Category,
Country,
City
))
and in the dimension label we need to use the below code:-
=if(GetSelectedCount(Dimension) =0, Category, pick(match([Dimension],'1','2','3'),
'Category',
'Country',
'City'
))
where 'Category', 'Country', 'City' are the filed names that will be shown like this:-
Thanks,
Sandip Ghosh
Nope; that's not possible;
But u want to show it in the title; I would suggest u not to use alternative dimension but rather do as follow:
- go to script, and create an inline table :
load * inline [
DimensionID, Dimension
1, Dim1
2, Dim2
];
- Now in ur sheet, above ur chart, add this new Dimension field as a filter
- In ur chart, instead of using alternative dimensions; use a calculated dimension as follow:
if(DimensionID=1, YourFirstDimension, YourSecondDimension)
-Now, in the title , u add this information to know which dimension we're working with
='My measure by '&Dimension
ps: u can add in the adds-on, to force users to select only one dimension: Count(Distinct Dimension)=1
Or, as a filter, use an extension and not the native Sense filter object, to force the user to be able to select only one Dimension:
example:
Hi,
Thank you very much for your help. I just implement this using the below code:-
in Script:-
[Dimension]:
load * inline [
DimensionID, Dimension
1, Category
2, Country
3, City
];
and use 'Dimension' field as a filter drop down.
after that we need to use the below code at chart title:-
='Dimension By ' & ' ' & if(GetSelectedCount(Dimension) =0, 'Category', pick(match([DimensionID],'1','2','3'),
'Category',
'Country',
'City'
))
and in the dimension filed we need to use the below code:-
=if(GetSelectedCount(Dimension) =0, Category, pick(match([DimensionID],'1','2','3'),
Category,
Country,
City
))
and in the dimension label we need to use the below code:-
=if(GetSelectedCount(Dimension) =0, Category, pick(match([Dimension],'1','2','3'),
'Category',
'Country',
'City'
))
where 'Category', 'Country', 'City' are the filed names that will be shown like this:-
Thanks,
Sandip Ghosh
Good but that makes my answer correct (just kidding)
yes, of course you are correct.