Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Our May 2021 end-to-end product release from Data Integration to Data Analytics is out! READ DETAILS
cancel
Showing results for 
Search instead for 
Did you mean: 
Go-Anna
Contributor III
Contributor III

SUM

Hi!

I have a table that makes a correct Total for TB2, but when use the same field in a KPI I don't get a result!

Go-Anna_0-1606934987375.png

This is my formula:

Num((([Hourly Sales Rate]*[No of Charged Hours])-(([Wage Cost per Hour]+[Overhead Cost per Hour])*[No of Charged Hours])),'# ##0',' ',)

This also works: (([Hourly Sales Rate]*[No of Charged Hours])-(([Wage Cost per Hour]+[Overhead Cost per Hour])*[No of Charged Hours]))

Grateful for help  to get the KPI sum to be the same as the sum in the table.🙂

Labels (3)
1 Solution

Accepted Solutions
Kush
MVP
MVP

@Go-Anna  you need aggr function here because in KPI you don't have any dimension. try below

=sum(aggr((([Hourly Sales Rate]*[No of Charged Hours])-(([Wage Cost per Hour]+[Overhead Cost per Hour])*[No of Charged Hours])), DimensionofYourTable))

Where DimensionofYourTable is Field used as dimension of your table. If you have multiple dimension then include those as well in aggr like  aggr(........, Dimenion1,Dimension2)

View solution in original post

2 Replies
Kush
MVP
MVP

@Go-Anna  you need aggr function here because in KPI you don't have any dimension. try below

=sum(aggr((([Hourly Sales Rate]*[No of Charged Hours])-(([Wage Cost per Hour]+[Overhead Cost per Hour])*[No of Charged Hours])), DimensionofYourTable))

Where DimensionofYourTable is Field used as dimension of your table. If you have multiple dimension then include those as well in aggr like  aggr(........, Dimenion1,Dimension2)

View solution in original post

Go-Anna
Contributor III
Contributor III
Author

Thank you so much Kush!