Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to do calculation in Text Object?

Hello everyone,

I am work at a Software Company as a Sales Specialist so I don't have any permission to change anything in the database or add something to the fields so my questions is;

I added a Text Object in my Qlikview 12 and wrote my Sales Target there for the whole year. I also added monthly revenue which can be found below.

= '2016 Sales Target:' & ' ' & '6.860.000 ₺' & '

' & AY & ' ' &  'Status:' & ' ' & money(Sum(SATIRNETTUTARI),'#.##0,00 ₺;-#.##0,00 ₺')

What I want to do is, subtract my whole year Sales Target from the all months to find which percentage that I am at.

To make sense more; We are currently in June, so I select the whole 6 months from my list box to show what my revenue is at the moment which can be found on by Sum(SATIRNETTUTARI). So I want to subtract 6.860.000 from Sum(SATIRNETTUTARI) but I couldn't find how and also add percentage on another line.

I hope I make sense.

Sincerely,

1 Solution

Accepted Solutions
sunny_talwar

Try this:

= '2016 Sales Target:' & ' ' & '6.860.000 ₺' & '

' & AY & ' ' &  'Status:' & ' ' & Money(Sum(SATIRNETTUTARI)-6860000,'#.##0,00 ₺;-#.##0,00 ₺') & '

' & 'Left to Target:' & ' ' & Money(6860000 - Sum(SATIRNETTUTARI),'#.##0,00 ₺;-#.##0,00 ₺')

View solution in original post

16 Replies
sunny_talwar

How about this:

= '2016 Sales Target:' & ' ' & '6.860.000 ₺' & '

' & AY & ' ' &  'Status:' & ' ' & money(Sum(SATIRNETTUTARI)-6860000,'#.##0,00 ₺;-#.##0,00 ₺')

How would the percentage be calculated outside QlikView?

Not applicable
Author

Thank you for your reply.

I want to do that in another line such as

= '2016 Sales Target:' & ' ' & '6.860.000 ₺' & '

' & AY & ' ' &  'Status:' & ' ' & money(Sum(SATIRNETTUTARI)-6860000,'#.##0,00 ₺;-#.##0,00 ₺') & '

' & 'Left to Target:' & ' ' & 6860000-money(Sum(SATIRNETTUTARI),'#.##0,00 ₺;-#.##0,00 ₺')


also in another line I want to show the percentage at where I am at.


I did that line before but it didn't work for some reason.

sunny_talwar

Try this:

= '2016 Sales Target:' & ' ' & '6.860.000 ₺' & '

' & AY & ' ' &  'Status:' & ' ' & Money(Sum(SATIRNETTUTARI)-6860000,'#.##0,00 ₺;-#.##0,00 ₺') & '

' & 'Left to Target:' & ' ' & Money(6860000 - Sum(SATIRNETTUTARI),'#.##0,00 ₺;-#.##0,00 ₺')

sunny_talwar

How do you calculate the percentage? What is the calculation?

Not applicable
Author

= '2016 Hedefim:' & ' ' & '6.860.000 ₺' & '

' & AY & ' ' &  'Durum:' & ' ' & money(Sum(SATIRNETTUTARI),'#.##0,00 ₺;-#.##0,00 ₺') & '

' & 'Hedefe Kalan:' & ' ' & Money(6860000 - Sum(SATIRNETTUTARI),'#.##0,00 ₺;-#.##0,00 ₺') & '

' & 'Hedefin Yüzdesi:' & ' ' & Sum(SATIRNETTUTARI)/6860000 * 100 & '%'

I did this but the percentage has too many decimals, I only want 2 digits at the end.

Also I want to show the whole 6 months revenue since we're in June. How can I do that?

As you see the picture I selected 6 months and "DURUM" shows me the whole 6 months revenue but when I choose only 1 month, it shows me that months revenue so I want Qlikview to show me the whole 6 months at all times even tho I do not select it the whole 6 months. I hope I make sense.

Untitled.jpg

sunny_talwar

Try this:

= '2016 Hedefim:' & ' ' & '6.860.000 ₺' & '

' & AY & ' ' &  'Durum:' & ' ' & money(Sum(SATIRNETTUTARI),'#.##0,00 ₺;-#.##0,00 ₺') & '

' & 'Hedefe Kalan:' & ' ' & Money(6860000 - Sum(SATIRNETTUTARI),'#.##0,00 ₺;-#.##0,00 ₺') & '

' & 'Hedefin Yüzdesi:' & ' ' & Num(Sum(SATIRNETTUTARI)/6860000, '##.00%')

Not applicable
Author

Nice, thank you so much!

How about the month part? On the list box, which can be found above, I choose the months from previous until now but I want to have that selected at all times inside of the expression even when I choose 1 month there?

I hope I make sense

sunny_talwar

So you basically want to ignore selections in Month Field?

= '2016 Hedefim:' & ' ' & '6.860.000 ₺' & '

' & AY & ' ' &  'Durum:' & ' ' & money(Sum({<MonthField = >} SATIRNETTUTARI),'#.##0,00 ₺;-#.##0,00 ₺') & '

' & 'Hedefe Kalan:' & ' ' & Money(6860000 - Sum({<MonthField = >} SATIRNETTUTARI),'#.##0,00 ₺;-#.##0,00 ₺') & '

' & 'Hedefin Yüzdesi:' & ' ' & Num(Sum({<MonthField = >} SATIRNETTUTARI)/6860000, '##.00%')

Not applicable
Author

This didn't work. It underlines the whole expression in red.