Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
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.
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))