Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have following data in my app, with both fields not related to each other:
In the app, we have a filter on 'Customer status', which is always on value ACTV.
I have a bar chart which shows data on the 'Activity Type' (stacked bar chart with color coding in function of the 'Activity Type').
- When Customer status = ACTV is not selected, the colors for each 'Activity Type' work correctly.
- but when Customer status = ACTV is selected (default), the colors are not shown. So I try to find a way to make that dimension ignore the filter on Customer status.
I have tried multiple solutions to have the Color by Dimension ignore the filter on [Customer status], but they don't seem to work:
- aggr(only({<[Customer status]=>} [Activity Type]),[Activity Type])
- concat({<[Customer status]=>} distinct [Activity Type], ',')
- aggr(concat({<[Customer status]=>} distinct [Activity Type],','),[Activity Type])
Do you have any idea what other possible solutions I could try?
For info, with color coding set to 'Single Color', I can see the activity types stacks, but cannot color each of them (see image). While when no selection is made on the ACTV value, the colors are rendered well (one for each activity type).
Hi,
Any possibility to share the QVF? This will make it easier to fix the problem.
Jordy
Climber
Hi,
There is confidential information in this QVF, so I cannot share it 😕
Are you using a color expression for color?
Hi,
Try this:
- aggr({<[Customer status]=>}only({<[Customer status]=>} [Activity Type]),[Activity Type])
- concat({<[Customer status]=>} distinct [Activity Type], ',')
- aggr({<[Customer status]=>}concat({<[Customer status]=>} distinct [Activity Type],','),[Activity Type]
I think you need the set analysis also in the aggregation.
Jordy
Climber
In the Colors and legend part of the bar chart, I use color 'By Dimension'. There I write the expression in the 'select dimension' box.
Have not tried that before, but where do you specify the color for each dimension? It is determined on it's own? May be try this
only({<[Customer status]=>} [Activity Type])
Thanks, I tried the 3 of them (in the color 'By Dimension', pasting it in the dimension field, but it didn't work.
For info, with color coding set to 'Single Color', I can see the activity types stacks, but cannot color each of them (see image). While when no selection is made on the ACTV value, the colors are rendered well (one for each activity type).
Thanks for the suggestion, but it didn't work.
Here's where I pasted the code:
Just out of curiosity, are you ignore selection in [Customer status] field within your expression or not?