Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
Is there any way to hide/ show the metrics column in Qlik sense pivot table?
I need to show metric values in pivot table based on filter selection.
For Example,
I have 2 metrics. One is Count and One is Sum.
If i select count in filter box, i want to see Order count in pivot table .
And if i select Sum i want to see the Sales amount in Pivot table.
Thanks in Advance
You can set a calculation condition that will show certain things in your chart based on selections. The calculation condition can be entered in the Properties panel, Add-Ons->Data Handling-> Calculation Condition prompt box
For example:
If([ListBoxMetric] = 'Count',(count(Orders)),(sum(Sales)))
This statement will see if your ListBoxMetric is 'Count.' If it is, it will calculate the expression, count(Orders). If it is not, such as if Sum is selected from your listbox, it will calculate the expression sum(Sales).
Does this help?
Use Load inline for create Metrics Table
For example:
Metrics:
LOAD * INLINE [
Metric,
Count,
Sum]
Then in the App, add Filter Panel with the metrics, and add a conditional in the PivotTable expression.
For Example:
IF(Metric='Count', COUNT(<Add your measure>),
IF(Metric='Sum',SUM(<Add your measure>),'Selected Metric')
)
This solves your demand.
Hi,
Thanks for the reply chris and juan.
This will help when i have only one metrics.
Actually when i select Count , i have 5 metrics to show. like order count, shipment count , number of days like that.
And also i don't want to show metric column itself if i have not selected a metric from filter box.
Thank you.
Abirami,
My post on this article goes exactly to meet your demand.
Take the test and mark the discussion as resolved if it works.
Hi Juan,
Sorry to say this.
I have tried. But it is not working for me.
Can you show us how it was?
Screenshot, etc.