Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have the Month dimension and 4 measures (Sales,Accounting,Marketing and Finance).
How to use measure as dimension and show the data in bar chart as shown below?
Data:
Load * Inline [
Month,Sales,HR,Accounting,Finance
Jan,80,47,61,19
Feb,78,42,63,19
Mar,72,36,60,17
Apr,73,35,62,17
May,81,42,65,20
Jun,84,40,63,20
Jul,72,35,60,17
Aug,80,40,58,19
Sep,77,45,63,21
Oct,81,42,65,20
Nov,84,40,63,20
Dec,72,35,60,17
];
Thanks in advance.
Hi,
Please find attached file for solution.
Regards,
Jagan.
Used this script
Data:
CrossTable(Department, Value)
Load * Inline [
Month,Sales,HR,Accounting,Finance
Jan,80,47,61,19
Feb,78,42,63,19
Mar,72,36,60,17
Apr,73,35,62,17
May,81,42,65,20
Jun,84,40,63,20
Jul,72,35,60,17
Aug,80,40,58,19
Sep,77,45,63,21
Oct,81,42,65,20
Nov,84,40,63,20
Dec,72,35,60,17
];
and in chart
Dimension: Department, Month
Expression: Sum(Value)
Hope this helps you.
Regards,
Jagan.
Nothing to do...
Just take Department & Month as a dimension
and sum(sales) as Measure....
PFA
Dimensions:
1) ValueList('Sales','Accounts','Finance','HR')
2) Month
Expression :
=pick(match(ValueList('Sales','Accounts','Finance','HR'),'Sales','Accounts','Finance','HR'),
sum(Sales),sum(Accounting),sum(Finance),sum(HR))
It seems, you really like this valuelist()/valueloop() functions (seen, you resolving few more issues with them here). However, it is suggested not to use them unless there is no other way at all. Because, as you might know, this method is too non-dynamic; maintenance-costly...
Hi,
You can also use ValueList() but it is a kind of hardcoding and complicated process. If the data is huge you will get performance issues.
Regards,
Jagan.
Yes, but it is not always the case. If your synthetic dimensions are fixed and amount of data is not so large it is easy to implement. Sometimes developer may not have rights to change the script or script is too complex so instead of doing changes in script developer may need to choose frond end solution.