Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

How to Add 2 expressions in Straight chart on same row?

Hi
i have a straight table with a column called "Cost".

i have added an expression which gives me Sum(cost) in USD. In the same Column i want to add another expression which will display the Sum(cost) in CAD.

How can i achieve this? If i add a new expression like 'sum(cost)*1.2' , it will display details in a new column which i dont need.

I just need the Aggregated Sums in same row for both USD and CAD.

Thanks

16 Replies
sergio0592
Specialist III
Specialist III

Hi, and if you try with :

='USD : '&sum(cost)&', CAD : '&(sum(cost)*1.2)

qlikviewwizard
Master II
Master II

Hi,

Try like this.

='USD : '&num(sum(Cost),'#,##0')&' -  CAD : '&(num(sum(Cost)*1.2,'#,##0'))

Capture.JPG

Anonymous
Not applicable
Author

Hi Arjun

Thank. This worked. But, i was looking for an output like below(From Excel):

  

RateCost
$0.5330$3.96
$0.5330$1.34
$0.5330$0.63
$0.5330$15.31
$0.5330$18.66
$0.5330$7.46
$0.5330$0.13
Total Cost
CAD$47.49
USD X  1.2932$61.41

So, under the cost field, i just want the USD calculation per row, but at the end, i want 2 rows to be displayed. One giving the value in CAD and one in USD.

Also, is there any way we can enter the USD rate dynamically while generating the Qlikview report?
When i pull report today, the rate maybe 1.293 and enxt month it could be 1.273, so can we enter this value manually?

qlikviewwizard
Master II
Master II

Hi Taher Talib,

Please check now.

='USD : '&num(sum(Cost),'#,##0.##')&' -  CAD : '&(num(sum(Cost)*1.2932,'#,##0.##'))

Capture.JPG

1.JPG

2.JPG

qlikviewwizard
Master II
Master II

Please check this app.

Anonymous
Not applicable
Author

Thanks for your help Arjun.

Also, could you please let me know how to edit a label for Straight table?

I am using the below in Dimensions tab in Straight table to get the number to 4 decimal points and this expression is displayed as a label in the straight table.

=Num(MINUTES,'##.0000')

How to change the lable name to "XX Minutes" instead of above expression?

Thanks

olivierrobin
Specialist III
Specialist III

hello

in your expression, use

if(dimensionality()=0, Code here what you want to see on total row,

sum(cost)

)

shansundar
Partner - Creator
Partner - Creator

Add two dummy values to your dimension like USD Cost & CAD Cost and then handle it with 'if else' or 'Pick Match' in your expression.

Please share an sample app if you want me to try.

Thanks,

Shan S

qlikviewwizard
Master II
Master II

Hi,

Please check this.

=num(sum(Cost),'#,##0.##') & ' Minutes'

Capture.JPG