cancel
Showing results for
Did you mean:
Master II

## Bar Chart - Use measure as dimension

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:

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

];

1 Solution

Accepted Solutions
Luminary Alumni

Hi,

Please find attached file for solution.

Regards,

Jagan.

8 Replies
Luminary Alumni

Hi,

Please find attached file for solution.

Regards,

Jagan.

Luminary Alumni

Used this script

Data:

CrossTable(Department, Value)

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.

Anonymous
Not applicable

Nothing to do...

Just take Department & Month as a dimension

and sum(sales) as Measure....

MVP

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))

MVP

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...

Luminary Alumni

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.

Community Browser