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: 
Swathi
Creator
Creator

values and percentage should be there in each label on line chart.

i using line for comparision of volume current previous year for each month. i need to show output each label need to show month on month percentage in bracketd,

below are the measures iam using for value

Line-Month

Measures

Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year]))'}>} delv_qty)

Sum({<MonthYear,Period,tkt_Year={'$(=Max(tkt_Year)-1)'}>} delv_qty)

Swathi_0-1704210449005.png

MOM percentage measure

(current year :(Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year]))'}>} delv_qty)
-
Above(Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year]))'}>} delv_qty)))
/
Above(Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year]))'}>} delv_qty)))

Previous year: ((Sum({<MonthYear,Period,tkt_Year={'$(=Max(tkt_Year)-1)'}>} delv_qty)
-
Above(Sum({<MonthYear,Period,tkt_Year={'$(=Max(tkt_Year)-1)'}>} delv_qty)))
/
Above(Sum({<MonthYear,Period,tkt_Year={'$(=Max(tkt_Year)-1)'}>} delv_qty)))

Swathi_1-1704210613425.png

it is two charts, i don't need two line charts in same chart i have to percentage in brackets beside value

for ex : 154.09k( MOM-0.7%) on each label value or 154.09(-0.7%), Kindly chart should be same, percentage values should come in brackets in each label

Labels (2)
1 Solution

Accepted Solutions
MeehyeOh
Partner - Creator
Partner - Creator

Hi, @Swathi 

I think cause is ')'.

Try this

Dual(

Num(Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year])-1)'}>} delv_qty),'#,##0') & '(' & Num((Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year])-1)'}>} delv_qty)
-
Above(Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year])-1)'}>} delv_qty)))
/
Above(Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year])-1)'}>} delv_qty)),'#,##0%')&')'
, Num(Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year])-1)'}>} delv_qty),'#,##0')

)

 

Reply, thanks!

View solution in original post

4 Replies
aruneshgupta
Creator
Creator

There might be a related solution involving four measures with combo chart (two for values with the primary axis and two for percentages as secondary values). You can choose to hide the legend if required. After that, enable data points. Offcoure you won't see values in brackets, but you can still see both sets of values. 

 

Best Regards,

Arunesh Kumar 

MeehyeOh
Partner - Creator
Partner - Creator

Hi, @Swathi 

I think it will work with dual function.

In your case, expression is 

Dual(

Num(Line-Month Measures expression,'#,##0') & '(' & Num(MOM percentage measure expression,'#,##0%')&')'

, Num(Line-Month Measures expression,'#,##0')

)

 

And you need chart properties change

Properties pannel - Line chart -  Data - Measures - Number formatting - Measure expression.

 

Then you can label value and percentage together.

sample)

MeehyeOh_1-1704238842867.png

 

Reply, Thanks!

 

Swathi
Creator
Creator
Author

@MeehyeOh , Many Thanks for the reply, iam not getting ouput showing undefined values, Kindly help me where iam doing, iam using below expression.

Dual(

Num(Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year])-1)'}>} delv_qty),'#,##0') & '(' & Num((Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year])-1)'}>} delv_qty)
-
Above(Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year])-1)'}>} delv_qty)))
/
Above(Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year])-1)'}>} delv_qty))),'#,##0%')&')'
, Num(Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year])-1)'}>} delv_qty),'#,##0')

)

MeehyeOh
Partner - Creator
Partner - Creator

Hi, @Swathi 

I think cause is ')'.

Try this

Dual(

Num(Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year])-1)'}>} delv_qty),'#,##0') & '(' & Num((Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year])-1)'}>} delv_qty)
-
Above(Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year])-1)'}>} delv_qty)))
/
Above(Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year])-1)'}>} delv_qty)),'#,##0%')&')'
, Num(Sum({<MonthYear,Period,tkt_Year={'$(=Max([tkt_Year])-1)'}>} delv_qty),'#,##0')

)

 

Reply, thanks!