Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Everyone,
I am creating one Bar chart with below dimensions and measures
Dim: Div_Code ( For exp 5 Div_codes)
Measure: 1. Sum( {< OrderDate={">=$(=YearStart(Max(OrderDate)))<=$(=Max(OrderDate))"} >}Amt)
2. Sum({<OrderDate={">=$(=MonthStart(Max(OrderDate)))<=$(=Max(OrderDate))"}>}Amt)
each bar is displaying each Div_code this is fine but i want to display One Bar with ALL Div_codes like below image
how can we display like above image , should we create derived field in script side or front end
if yes how to write the derived field in script or chart expression.
please suggest anyone.
Thank you in advance
-Eshwar
In your script, create an inline table having the same field name as your DIV CODE field name and use 'All' as value under that inline table field.
AllDivCode:
load * inline
[
DIVCODE
All
];
concatenate this table to your fact table which contains main DIV CODE field.
In Chart measure expression, write an if() condition:
=if(DIVCODE='All', sum(total Sales), sum(Sales))
Sample data used:
Output:
Regards,
Aditya
In your script, create an inline table having the same field name as your DIV CODE field name and use 'All' as value under that inline table field.
AllDivCode:
load * inline
[
DIVCODE
All
];
concatenate this table to your fact table which contains main DIV CODE field.
In Chart measure expression, write an if() condition:
=if(DIVCODE='All', sum(total Sales), sum(Sales))
Sample data used:
Output:
Regards,
Aditya
Thank you Aditya for u r reply .
it is working as expected.
But trying to achieve with diff expression is not working.
If(DIVISION_CODE='ALL',Sum(Total Sales)/Sum(CST_CNT),Sum(Sales)/Sum(CST_CNT))
Can u suggest on this.
Thanks in advance
-Eshwar