Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Not applicable

Dynamic (based on variable) status as a dimension?


I have a document with data representing report usage. The basic structure is :

- Report (the name of the report)

- User (the username)

- Hits (the number of times this user has launched thie report)

The document presents a table with one row per Report and the total of Hits (defined as Sum(Hits)). There is a slider linked to the variable vThreshold used to determine what Report would be decommissioned. I created the variable vCommissionStatus as If(Sum(TOTAL <Report> Hits) >= vThreshold, 'Keep', 'Decommission').

Using this variable works well for displaying purposes as well as for text coloring conditions ; Background color has the following value: =If($(vCommissionStatus) = 'Decommission', Red(), Green()).

Now I'd like to display a pie chart to show the part of reports that should be decommissionned if we decide to use the given treshold. I tried to use =$(vCommissionStatus) as a calculated dimension for the pie chart but it doesn't work. Actually, it seems I can't use this variable as a calculated dimension anywhere.

Is there a way to use the commision status as a dimension? How can this be done?



2 Replies
Not applicable

Re: Dynamic (based on variable) status as a dimension?

Hi Guillaume,

If I understand correctly and you want a pie chart that shows the number of reports that should be kept and the number that should be decommissioned, based on your threshold, try creating a pie chart with the dimension and expression as follows -





Hope that's what you need.


Not applicable

Re: Dynamic (based on variable) status as a dimension?

I'm struggling with a similar issue.  I tried your solution, but I'm finding that the expression won't split my counts into the categories set by the dimension.  In other words, the entire population shows up in each category.  Any thoughts?