Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
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))