Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

KPI Sum expression problem

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

20 Replies
sunny_talwar
MVP
MVP

You can try this

Sum(Aggr(Sum([Price])*Count([Repair no]), [Part changed]))

Anonymous
Not applicable
Author

Still it doesnt calculate correct

sunny_talwar
MVP
MVP

Based on the sample provided... what is the correct output?

sunny_talwar
MVP
MVP

Is 8302 not the right number?

Capture.PNG

Anonymous
Not applicable
Author

The correct number is 8302

I use the KPI chart, dont we agree that expression should be entered here under Expression?

2018-03-07_12-48-51.png

sunny_talwar
MVP
MVP

The screenshot I posted was from QlikView... here is a Qlik Sense screenshot and sample

Capture.PNG

Anonymous
Not applicable
Author

Where do you enter the formula?

Did you enter it under Expression?

sunny_talwar
MVP
MVP

Capture.PNG

Anonymous
Not applicable
Author

Super, thanks a lot... I will investigate whats wrong with mine.

thanks a lot... I will close the ticket asap I have completed the investigation.

I hope its ok

sunny_talwar
MVP
MVP

Sure it is