Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Prevent auto sum in KPIs

Hi,

I have created a time-series dataset for revenue from January to December by month. When I create a KPI for Revenue, I can have it show me the sum, avg, etc of revenue. Is there any way I can have it show revenue of the earliest date by default instead?

Thanks.

1 Solution

Accepted Solutions
santhoo_san
Partner - Creator II
Partner - Creator II

use set analysis within your expression

sum({<DateID={$(=max(DateID))>}Amount)

View solution in original post

7 Replies
santhoo_san
Partner - Creator II
Partner - Creator II

use set analysis within your expression

sum({<DateID={$(=max(DateID))>}Amount)

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

use FirstSortedValue? If you have to pre-aggregate, use AGGR() by Date. Something like this maybe:

FirstSortedValue(

     AGGR(

          sum(Sales)

     , Date)

, Date)

Not applicable
Author

Hi all,

The issue is still not resolved. I have tried both methods but the KPI still shows the sum of the measure of all dates. I just want the KPI to show the measure of the earliest date.

Thank you for your help.

Allen

Not applicable
Author

Hi,

Can you share a sample of your app ?

Regards,

Xavier.

Oleg_Troyansky
Partner Ambassador/MVP
Partner Ambassador/MVP

Allen,

we are all trying to help, but you'll have to be more descriptive than this. It's not enough to say that it doesn't work. Please elaborate - what expressions have you tried, and what is your data structure. And, ideally - a sample app would be the best way for you to help us help you.

cheers,

Oleg

Not applicable
Author

Hi Oleg,

I've got it to work. Thank you all. The way it worked is Sum({$<Dates= {"$(=Max(Dates))"}>} Amount). Seems like only the quotes were missing

Michael_Tarallo
Employee
Employee

Hi Allen,

What you want to do requires an expression in the object using Set Analysis, exactly what has been provided to you by our great community members. If you would like more information on Set Analysis  I suggest you watch these brief videos on the topic:

A Beginners' Introduction to Set Analysis (video)

Please mark the appropriate replies as CORRECT / HELPFUL so our team and other members know that your question(s) has been answered to your satisfaction.

Regards,

Mike Tarallo

Qlik

Regards,
Mike Tarallo
Qlik