Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Is it possible to show 2 different #KPI's based on the same fields?
I have this fields:
Item | Currency | Price | Purchased UNIT Qty |
A | USD | 250 | 100 |
B | USD | 100 | 150 |
C | EUR | 125,12 | 100 |
D | USD | 20 | 200 |
E | EUR | 26 | 40 |
F | USD | 300 | 50 |
G | USD | 110 | 15 |
H | USD | 112 | 60 |
I | EUR | 10 | 500 |
J | EUR | 25 | 400 |
K | EUR | 50 | 100 |
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 |
Item | Currency | Price | Purchased UNIT Qty | Purchased Value |
A | USD | 250 | 100 | 25000 |
B | USD | 100 | 150 | 15000 |
D | USD | 20 | 200 | 4000 |
F | USD | 300 | 50 | 15000 |
G | USD | 110 | 15 | 1650 |
H | USD | 112 | 60 | 6720 |
Totall | 67370 |
Item | Currency | Price | Purchased UNIT Qty | Purchased Value |
C | EUR | 125,12 | 100 | 12512 |
E | EUR | 26 | 40 | 1040 |
I | EUR | 10 | 500 | 5000 |
J | EUR | 25 | 400 | 10000 |
K | EUR | 50 | 100 | 5000 |
Totall | 33552 |
Yes
KPI 1
SUM({$ <Currency={'USD'}>} PurchasedValue)
KPI 2
SUM({$ <Currency={'EUR'}>} PurchasedValue)
Yes
KPI 1
SUM({$ <Currency={'USD'}>} PurchasedValue)
KPI 2
SUM({$ <Currency={'EUR'}>} PurchasedValue)
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.
Hi Please see the attached app. Exactly what you needed.
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.
Thanks, your formula worked!