
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How to create dimension for use pie chart
Dear all
Another challenge in my Qlik Sense journey.
I want to create a pie chart showing which portion of the Budget is allocated vs. what is remaining.
In my data, I have no 'dimension' for this - as this is embedded in the measures itself (columns).
Should I solve this via the crosstable function (in script) or is there another easier way to tackle this?
My data comes like:
Department, Budget, Budget - allocated, Budget - remaining
Finance,100, 20, 80
My pie chart would simply show:
20 Allocated and 80 Remaining
Many thanks for your thoughts on this!
Accepted Solutions


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
in pie chart you could use a calculated dimension as below:
ValueList('Allocated','Remaining') for budget type
and then in your expression something as below:
if( ValueList('Allocated','Remaining') = 'Allocated',
yourExpressionForAllocatedBudget, yourExpressionForRemainingBudget )
I hope it helps.


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
you can create a pie Chart, two expressions (sum(Budget) and sum(Budget - remaining)) with a dimension
=' '
but I think better would be crosstable (Budget, Budgettype) load * from Data
then pie chart,
Dimension Budgettype,
Expression sum({<Budgettype = {'Budget','Budget - remaining'}>} Budget)
Regards


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
in pie chart you could use a calculated dimension as below:
ValueList('Allocated','Remaining') for budget type
and then in your expression something as below:
if( ValueList('Allocated','Remaining') = 'Allocated',
yourExpressionForAllocatedBudget, yourExpressionForRemainingBudget )
I hope it helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
thanks a lot Andrea!
your suggested approach is simple to implement and works great!
just tested it


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Great!
Could you please mark the answer as correct to help other members?
Thanks.
