Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, I have a table containing multiple columns and I am displaying a graph based on two columns, Attributes and Values. There are five attributes (A , B, C, D and E ) and I am showing a simple bar graph of values for each of them. I have set Attributes as dimension and sum(value) as expression. My requirement is to not display all attributes separately as five bars but instead A and B clubbed into one bar called AB, C will remain as such and finally D and E combined into a bar called DE. Just three bars as final. I tried creating calculated dimensions but I am unable to, Can someone help me here?
O I forgot to mention that you should remove the Attribute as a dimension. You are "replacing" the dimension with multiple expressions.
A fast solution to your problem is to define one expression per calculation requirement in your chart.
SUM({$<Attribute = {'A','B'}>}Value)
SUM({$<Attribute = {'C'}>}Value)
SUM({$<Attribute = {'D','E'}>}Value)
Vegar Lie Arntsen
I tried this Let's say I just add the first expression, I still get two bars. I need just one bar having the sum of both..
At properties, style, subtype choose stacked bars.
O I forgot to mention that you should remove the Attribute as a dimension. You are "replacing" the dimension with multiple expressions.
Thanks this works but is there a better solution? I just provided a sample question and in the real application the graph as two more expressions depending on the same dimension.
Is there a way I can create dimensions for clubbing?
I would have created a new dimension in my script where I assign my transactions to my dimensions. There are several ways to do it, but the most fool proof is to use a mapping table.
My_map:
MAPPING LOAD * INLINE [
OrigDim, NewDim
A, AB
B, AB
C, C
D, DE
E, DE
]
Trans:
LOAD
*,
ApplyMap('My_map', OrigDim, null() ) as NewDimension
FROM ... ;
//Vegar
Thank you Vegar, I will explore this solution.