Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hello,
Here's the mockup of my data:
I wanted to
(1) create a calculation/expression to retrieve the value as of latest date based on the Date field, and put into a KPI chart as the measure.
(2) I also want the KPI box to be driven by the filter of Customer
So if I select Wholefoods in the filter, I want the 500 to be displayed in the KPI chart.
How can I achieve this? Thank you !!!!
Here are a couple of solutions from the community:
https://community.qlik.com/t5/New-to-Qlik-Analytics/Max-Date/td-p/1812770
https://community.qlik.com/t5/App-Development/max-value-of-max-date/td-p/1821544
'Max" reference material:
Kind regards...
May be this expression in KPI, works for me -
Max(Aggr(firstsortedvalue(Aggr(Max(Value),Date),-Date),Customer))
Try this also, much simpler -
Max(Total<Date> Value)
hello! Thanks very much for your help. I tried both formula you gave but they didn't work unfortunately 😞
Attaching all the fields of data - could you help investigate?
So essentially I want the latest Sales Revenue to be displayed in the KPI chart, driven by the customer name chosen in a filter. The 'latest' is determined by the Qlik Date field.
-> Based on the data in attached file, I would want to show the 250 as my KPI if I select Whole Foods in my filter.
what I tried was:
1. create an expression to convert Qlik Date field to date format, and name this new field [Qlik Date in Date Format]
2. Then i created another expression for Sales Revenue, and name this new field [Sales Revenue]:
3. Then I used your formula to calculate latest sales revenue:
My KPI chart shows '-' with customer filtered.
The problem appears to be with your data.
1. ensure your source data is accurate (valid date and text fields in your excel file...general is used).
2. you may not have correct associative source data. Source data may be in invalid format.
3. when you have valid source data, ensure to concatenate your fields to create monthyear date values. (not shown in uploaded sample provided.
The solution provided by @Digvijay_Singh does work if used with valid source data. His code is used in the app uploaded here.
You may use the attached QVF to reverse engineer what was done.
Should you need further assistance, you may wish to reach out to one of our trusted Qlik Partners or Qlik Professional services to troubleshoot your source data.
Kind regards...well done @Digvijay_Singh