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
Join us March 10th, 7 ways modern analytics can help you take smarter action. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bellesol
Creator
Creator

Show total row when using Only function in set analysis

Hi,

How can I Display the total row when I use a non-aggregate function in  Set analysis?

the calculation is like this:

aggr(Only({$<Year={$(=max(Yea))}>}Name),ListOfOtherDimensions)

It works but I want to display the total row of the chart

 

4 Replies
Vegar
Partner
Partner

How do you want to calculate the total row? It looks like you are listing names, how would the total of a set of names look like? Please explain. 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Kush
MVP
MVP

@bellesol  looks like your set analysis returns text value which means total can't be calculated.  You should have numeric values to get total. If you mean that you have numeric field with same expression then try below

sum(aggr(Only({$<Year={$(=max(Yea))}>}Name),ListOfOtherDimensions))

bellesol
Creator
Creator

Hi,

sorry my bad, I didn't mention that the field NAME is actually a numerical field (I know I know... but that's the way it is - I didn't build this DB...:)) 

The table is a pivot table and I need to display this field without doing SUM aggr. (show it as is, as a dimension in the "measures area" ) 

when I use the calculation I wrote, the value is OK but the total row is getting the value "-", how can I sum up only the total row?

I hope I'm clear. 

 

Vegar
Partner
Partner

You can do a conditional expression using IF() and Dimensionality(), like this.

IF( Dimensionality() >0, YourRowExpression, YourTotalExpression) 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes