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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to hide calculated values from cells but leave total

In the script attached, in the column "Cost", each employee has a cost associated with her.

For presentation purposes, I would like to show blank cells and only show the total of 592,45. Is this possible?

Employee  NameTotal Employee CostTotal Employee  HoursEmployee Hourly  CostCost
EMP13.201,00  €23,5020,73 €
EMP31.072,93  €1,7514,80 €
EMP41.915,45  €4,5012,28 €
EMP62.409,94  €1,5016,07 €
Total8.599,32  €31,2516,14 €592,45 €

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Maybe like attached?

edit:

Cost expression:

=if( Dimensionality()=0,

sum(aggr(

sum(HoursWorked) *

sum({<EmpName={"=sum(HoursWorked)>0"}>}  EmpTotalCost)

/ sum({<Activities= , EmpId={"=sum(HoursWorked)>0"}>} total <EmpName> HoursWorked)

,EmpName))

)

and set an appropriate NULL representation string in presentation tab.

View solution in original post

3 Replies
swuehl
MVP
MVP

Maybe like attached?

edit:

Cost expression:

=if( Dimensionality()=0,

sum(aggr(

sum(HoursWorked) *

sum({<EmpName={"=sum(HoursWorked)>0"}>}  EmpTotalCost)

/ sum({<Activities= , EmpId={"=sum(HoursWorked)>0"}>} total <EmpName> HoursWorked)

,EmpName))

)

and set an appropriate NULL representation string in presentation tab.

Not applicable
Author

Thank you. This did the trick for the particular example. So I mark it as a correct answer.

I have another case, where I want to have the same result, but instead, all cells become blank. Shall I post that particular example and open an new thread or there is an easy way to deal with the problem?

Thanks!

swuehl
MVP
MVP

If you tell us a bit more about your other case, I will try to help you with that, too.

But it's more important that you try to understand how above works (how the dimensionality() function could be used to tell if an expression is evaluated in Total context or not). If you are using a pivot table chart with pivoted dimension, you might need to look into secondarydimensionality(), too.

If you are using some different levels of aggregation, you might need to adapt the comparison to the right number representing the level, please check the Help, 'Examples of Chart Inter Record Functions'.

Instead of using an expression that only evaluates if the dimensionality() is right, you can keep your expression as is and use the expression attribute 'text color' (open the attributes in expression tab by clicking on the plus sign next to the expression label) to set the color to white:

=if(Dimensionality(),white())