Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Is it possible to show 2 different #KPI's based on the same fields

Hi,

Is it possible to show 2 different #KPI's based on the same fields?

I have this fields:

 

ItemCurrencyPricePurchased UNIT Qty
AUSD250100
BUSD100150
CEUR125,12100
DUSD20200
EEUR2640
FUSD30050
GUSD11015
HUSD11260
IEUR10500
JEUR25400
KEUR50100

Now I like to have 2 #KPI's, 1 with the Sum of the Purchased Value in USD and 1 with the Sum of the Purchased Value in EUR.

So that would be:

#KPI

$ 67.370,00

#KPI

€ 33.552,00

   

ItemCurrencyPricePurchased UNIT QtyPurchased Value
AUSD25010025000
BUSD10015015000
DUSD202004000
FUSD3005015000
GUSD110151650
HUSD112606720
Totall 67370

   

ItemCurrencyPricePurchased UNIT QtyPurchased Value
CEUR125,1210012512
EEUR26401040
IEUR105005000
JEUR2540010000
KEUR501005000
Totall 33552
1 Solution

Accepted Solutions
ogster1974
Partner - Master II
Partner - Master II

Yes

KPI 1

SUM({$ <Currency={'USD'}>} PurchasedValue)

KPI 2

SUM({$ <Currency={'EUR'}>} PurchasedValue)

View solution in original post

5 Replies
ogster1974
Partner - Master II
Partner - Master II

Yes

KPI 1

SUM({$ <Currency={'USD'}>} PurchasedValue)

KPI 2

SUM({$ <Currency={'EUR'}>} PurchasedValue)

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this, modify your script like below

QVTableName:

Load

Item,

Currency,

Price

[Purchased UNIT Qty],

Price * [Purchased UNIT Qty] AS PurchasedValue

FROM DataSource;


Now use below expressions:

Expression 1:

SUM({<Currency={'USD'}>} PurchasedValue)

Expression 2:

SUM({<Currency={'EUR'}>} PurchasedValue)

Hope this helps you.

Regards,

Jagan.

raju_insights
Partner - Creator III
Partner - Creator III

Hi Please see the attached app. Exactly what you needed.

Capture2.JPG

Anonymous
Not applicable
Author

Thanks for your reply.

Your script worked but strangely the prices were not correct.

I entered the formula in the #KPI and then the prices are correct.

Anonymous
Not applicable
Author

Thanks, your formula worked!