Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi ,
Sorry to ask to many basic questions. haven't gone through the training..
In qlikview we can dynamically hide and enable expression and dimension in the chart with button action or listbox selection. How can i do the same in Qliksense. i know we cannot create variables and buttons. Is there any better approach and also it would be more helpful if anyone shares any sample document. Can we conditionally hide and enable a object in Qlik sense.
One of my colleague helped me on this. Wanted to post because there could be people like me...
Modify your script like this:
Define a table with the field names that you wish to select for your chart (it can be an inline table or any other type of table.)
Set HidePrefix accordingly
Create a variable to hold the Current Primary Dimension. (It will only have a value if a value is selected.)
SET HidePrefix='_' ;
PrimaryDimension:
Load * Inline [
_PrimaryDimension
Division
Invoice Year
];
LET vCurrentPrimaryDimension = '=$(GetCurrentField(_PrimaryDimension))';
Modify your GUI like this:
Add a listbox
Set the Field function as:
=[_PrimaryDimension]
Title value as:
Select Dimension
Add a Chart:
Define the Dimension of your Chart to be:
Field function:
=[$(=_PrimaryDimension)]
Label
(leave it blank) Unfortunately, the label does not allow a function, so it cannot be variable
Set the Title of your chart to be:
='$(=_PrimaryDimension)'
(Optional) And the Footnote of your chart to be:
='$(=_PrimaryDimension)'
And i don't the answer whether we can hide and enable a chart.
May be create an Inline table and control the dimensions based on the inline table dimension using GetFieldSelections()
That is a good idea.i will try that and let you know. One more thing we cannot hide and enable charts in Qlik sense? Do we
One of my colleague helped me on this. Wanted to post because there could be people like me...
Modify your script like this:
Define a table with the field names that you wish to select for your chart (it can be an inline table or any other type of table.)
Set HidePrefix accordingly
Create a variable to hold the Current Primary Dimension. (It will only have a value if a value is selected.)
SET HidePrefix='_' ;
PrimaryDimension:
Load * Inline [
_PrimaryDimension
Division
Invoice Year
];
LET vCurrentPrimaryDimension = '=$(GetCurrentField(_PrimaryDimension))';
Modify your GUI like this:
Add a listbox
Set the Field function as:
=[_PrimaryDimension]
Title value as:
Select Dimension
Add a Chart:
Define the Dimension of your Chart to be:
Field function:
=[$(=_PrimaryDimension)]
Label
(leave it blank) Unfortunately, the label does not allow a function, so it cannot be variable
Set the Title of your chart to be:
='$(=_PrimaryDimension)'
(Optional) And the Footnote of your chart to be:
='$(=_PrimaryDimension)'
And i don't the answer whether we can hide and enable a chart.
Yaar Sunny do you know how to define that Getfeildselections in the front end in the dimension.
Kya matlab Vinay bhai? Can you share an example of what you trying to do?
Sunny the solution which i have provided above is working but the label is showing a variable name not the selected field name. But i want to try your GetFieldSelections() option too.. for example in the script i have defined the inline table as below:
PrimaryDimension:
Load * Inline [
_PrimaryDimension
DIVISION_NAME
SalesRepName
Sales Channel
Delivery State
OCUSMA State
];
when i take the _PrimaryDimension in the filter pane. And now i want the same field to be displayed in the chart too..Let me know if that makes sense. otherwise i will post you in some more detail.
one thing you wont have with this approach is "Always One selected" if user doesnt pick anything you will error in the chart.
i am using an list box extension for my on the fly metrics/dimension selections.
Well, the idea you have below is what I wanted to propose also. GetFieldSelections was an idea to restrict measures and dimensions. But I have very limited knowledge of how to do it in Qlik Sense. I guess Phani might be able to shed more light on that
Hey super raa...