Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I try to make a KPI that calculate total cost for rearing a car
The data are spreed in several spread sheets.
In sheet 1 I have
Repair no Part changed
1 Tires
2 Engine
3 Screw
4 Tires
5 Screw
In sheet 2 I have
Part changed Price
Tires 100
Engine 8100
Screw 1
Front glass 300
I tried with this expression
Sum([Price]*Count([Repair no]))
But it doesnt work, can you give me a hint whats wrong?
Thanks,
Peter
May be this
Sum([Price])*Count([Repair no])
check this out.you forgot to aggregate with respect to each and every part changed for both sum and count.
See attached qvw
May be this Expected output-
Thanks all of you, it is solved with your input
Pls close the thread
Hi,
When I use Sum([Price])*Count([Repair no]) I get a wired number
Krishna what expression did you use?
= sum({$< [Part changed]={'Engine'}> }Price)* count({$< [Part changed]={'Engine'}> }[Part changed]) +
sum({$< [Part changed]={'Tires'}> }Price) * count({$< [Part changed]={'Tires'}> }[Part changed]) +
sum({$< [Part changed]={'Screw'}> }Price)* count({$< [Part changed]={'Screw'}> }[Part changed])
As you have different parts and each have respective counts and aggregation, the below expression yields wierd numbers.
Sum([Price])*Count([Repair no])
Thanks
What if the numbers of parts on the list is huge fx several hundreds, is there a better way to solve the issue?