Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikviewwizard
Master II
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?

Capture.PNG

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.

1 Solution

Accepted Solutions
jagan
Luminary Alumni
Luminary Alumni

Hi,

Please find attached file for solution.

Regards,

Jagan.

View solution in original post

8 Replies
jagan
Luminary Alumni
Luminary Alumni

Hi,

Please find attached file for solution.

Regards,

Jagan.

jagan
Luminary Alumni
Luminary Alumni

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.

Anonymous
Not applicable

Nothing to do...

Just take Department & Month as a dimension

and sum(sales) as Measure....

tresesco
MVP
MVP

PFA

Kushal_Chawda

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

Capture.JPG

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

jagan
Luminary Alumni
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.

Kushal_Chawda

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.