# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
QlikWorld 2023, a live, in-person thrill ride. Save \$300 before February 6: REGISTER NOW!
cancel
Showing results for
Did you mean:
Partner - Creator II

## Measure in x-axis and dimension as y-axis

Hi All,

Please check the table and requirement below and help me if it is possible.

Data has Month and Balances
Eg

 Jan Feb Mar Apr Op Bal 100 200 300 400 Collection 50 40 80 60 New 20 30 40 50 Cl Bal 70 190 260 390

We are able to prepare a chart with Month on X axis and Balances on Y axis.

Current chart

Requirement is to show the balances on X axis

Regards,
Puneet Agarwal

18 Replies
Creator III

try like below

CrossTable(Month,Amount)
Item,Jan,Feb,Mar,Apr
OpBal,100,200,300,400
Collection,50,40,80,60
New,20,30,40,50
ClBal,70,190,260,390
];

Dimensions: Item, Month

measure: Amount

Partner - Creator II
Author

Hi,
Thanks for reply.. Sorry i did not provide one more information in the previous post, so we are not getting the values of OplBal,Collection,New,CLBal from data source we are calculating in UI itself i mean in chart.

Any suggestions how to calculate in UI.

Regards,
Puneet

Creator III

sum(jan)

sum(feb)

Creator III

You have to create a bar graph with Balances as group and month as Bar with the respective measure.

Creator
Hi
Creator

Creator

using cross table will b  the best choice.

Partner - Creator II
Author

Hi Raj,

I cannot use cross table because i am calculating the value of OPL Bal ,Close Bal, New ,Coll by expressions. Hope you understand what i want to convey.

Regards,
Puneet Agarwal

Creator II

without using the cross table gets a little harder

as these lines are calculations, you can use valuelist in the dimension

``ValueList('Op Bal','Collection','New','Cl Bal')``

in each measure you will need to make a conditional expression

``````=if(ValueList('Op Bal','Collection','New','Cl Bal') = 'Op Bal',sum(Rand()),
if(ValueList('Op Bal','Collection','New','Cl Bal') = 'Collection',sum(Rand()),
if(ValueList('Op Bal','Collection','New','Cl Bal') = 'New',sum(Rand()),
if(ValueList('Op Bal','Collection','New','Cl Bal') = 'Cl Bal',sum(Rand())
))))``````

Change the expression "sum (Rand ())" to its correct sum expression