Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
wschefter
Contributor II
Contributor II

Creating a KPI from Data within two separate fields

Hi all;

Still a semi-newbie...

I am trying to create a KPI that looks at the previous month only pulling specific data from two different fields.  The first field name is "Spec.Stock" and the choices are as follows:

Whse Stock

Consignment

Stock @ Vendor

The second is my values from the field EUR.

This is the expression I have written for a different KPI that looked at the values for the previous months out of field EUR:

sum({<[=[Month.autoCalendar.MonthsAgo]={1}>}EUR)

This worked as planned but what I have been unable to figure out is how to write the expression to just pull the values from the field EUR for "Whse Stock" from "Spec. Stock".

Any advice or pointing me at the correct discussion/stream would be greatly appreciated.

Thanks in advance.

1 Solution

Accepted Solutions
sunny_talwar

May be this

Sum({<[=[Month.autoCalendar.MonthsAgo] = {1}, [Spec. Stock] = {'Whse Stock'}>}EUR)

View solution in original post

5 Replies
sunny_talwar

May be this

Sum({<[=[Month.autoCalendar.MonthsAgo] = {1}, [Spec. Stock] = {'Whse Stock'}>}EUR)

krishna_2644
Specialist III
Specialist III

Sum({$<[Spec. Stock] = {'Whse Stock'}>}EUR)  - this expression pulls EUR choices where  [Spec. Stock] = {'Whse Stock'} and sums it up.

If u need more filters like month=xyz etc, just keep on adding as suggested above by sunny.

shiveshsingh
Master
Master

Add those fields in you set expression.

sum({<[=[Month.autoCalendar.MonthsAgo]={1}, [Spec. Stock] = {'Whse Stock'} >}EUR)

sasiparupudi1
Master III
Master III

Sum({<[Spec. Stock]={'Whse Stock'}>}EUR)

wschefter
Contributor II
Contributor II
Author

All of you, thank you very much.  This is exactly what I needed.  As I keep learning hopefully I will not need to keep asking these simple questions.

Again, thanks, I really appreciate it.

Will