Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Charity | Amount Collected by Employees |
Mend Our Mum | £58.12 |
British Heart Foundation | £82.39 |
St. Luke's Hospice |
I would like a text box which states:
Last donation was to 'British Heart Foundation' with a total amount of '£82.39'
However, when there is a value entered in the spreadsheet for St. Luke's I would like to show that.
Therefore ALWAYS showing the last value found but the user still has the ability to make previous selection.
Thanks
Use this script where I create a new Column RowNo() as S.No and use that in your text box:
Script:
Table:
LOAD RowNo() as S.No,
Charity,
[Amount Collected by Employees]
FROM
[https://community.qlik.com/thread/163806]
(html, codepage is 1252, embedded labels, table is @1);
Text Box Object's Expression:
='Last donation was to ' & Chr(39)& Only({<S.No = {"$(=Max({<[Amount Collected by Employees] = {'*?'}>} S.No))"}>} Charity) & Chr(39) & ' ' &
'with a total amount of ' & Chr(39) & Only({<S.No = {"$(=Max({<[Amount Collected by Employees] = {'*?'}>} S.No))"}>} [Amount Collected by Employees]) & Chr(39)
Also find attached a sample application.
HTH
Best,
Sunny
Hi,
Do you have any id field/ Date Field which gives you which one entered last ????
Look for FirstSortedValue() it might help you..
Regards
Hi emma,
there are probably different ways to do this.
The probably easiest one (I can think of) though is to create a textbox that
- shows the last donation (by date, just use the max(date) function to find out about that)
- is visible only as long as the user has not made any selections
(use the Getcurrentselections() or Getfieldselections([field]) function to find out about that)
HTH
Use this script where I create a new Column RowNo() as S.No and use that in your text box:
Script:
Table:
LOAD RowNo() as S.No,
Charity,
[Amount Collected by Employees]
FROM
[https://community.qlik.com/thread/163806]
(html, codepage is 1252, embedded labels, table is @1);
Text Box Object's Expression:
='Last donation was to ' & Chr(39)& Only({<S.No = {"$(=Max({<[Amount Collected by Employees] = {'*?'}>} S.No))"}>} Charity) & Chr(39) & ' ' &
'with a total amount of ' & Chr(39) & Only({<S.No = {"$(=Max({<[Amount Collected by Employees] = {'*?'}>} S.No))"}>} [Amount Collected by Employees]) & Chr(39)
Also find attached a sample application.
HTH
Best,
Sunny
Worked perfectly Sunny - really appreciate your help
Awesome
I am glad it worked.
Best,
Sunny