Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Krish
Contributor III
Contributor III

Totals field not working in Qliksense table

Hi,

I have created a Qliksense table calculation dimension based on valuelist function and have measures calculated based on if condtion inside the measure. The calculations are working, but the totals is not getting populated.

Dimension : Valuelist('a','b',c')

Measure :

if(valuelist('a','b',c') = 'a',(if(year=2022,count({cond} id),count({cond} id),if(valuelist('a','b',c') = 'b',(if(year=2022,count({cond} id),count({cond} id) ...

I have conThis works and returns the number but the total field is displayed as Null.  I do not see the Totals function field in properties as well.

 

Labels (3)
2 Replies
Or
MVP
MVP

At the total level, the valuelist(a,b,c) doesn't actually populate, so it seems your statement isn't returning a result. You'll probably want to re-write the formula so the if() logic is inside the count() rather than vice versa.

Krish
Contributor III
Contributor III
Author

I can't use the if logic directly because the expression has a P() function which is dependent on the value.

eg:

if( valuelist('a','b','c') = 'a',

(if(year=2022,count({< cond1=2022 , cond2=, cond3 = {'b'}, cond4 = p(cond3 ={'a'} .. distinct id) >} distinct id),

count({< cond1=2021 , cond2, cond3 = {'b'}, cond4 = p(cond3 ={'a'} .. distinct id) >} distinct id))