Skip to main content

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

cancel
Showing results for 
Search instead for 
Did you mean: 
davyqliks
Specialist
Specialist

Issue with totals in Table when no selections made

Hi All,

I have the following expression which works perfectly when an Order is selected and shows the correct return, however when no selections are made the total is the same on all lines and a sum total of all lines in the total.

Here is the Meaure

Sum(aggr(sum( total Aggr(Sum( distinct {<SustainableLevel = {'Sustainable'}>}Weight),Fibres) )

, "Portal Order No." )

)

 

With no selections made

davyqliks_0-1648714761250.png

 

With a selection made

davyqliks_1-1648714789467.png

 

Can anyone assist so that the when no selections made the lines show their correct returns.

Thank you for your help in advance

 

Daniel

 

Labels (4)
1 Solution

Accepted Solutions
vinieme12
Champion III
Champion III

Sum(Aggr( Sum( distinct {<SustainableLevel = {'Sustainable'}>}Weight) , Fibres , "Portal Order No.")))

and change total  in chart to sum of rows

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.

View solution in original post

4 Replies
abhijitnalekar
Specialist II
Specialist II

Hi @davyqliks ,

As you have aggregated the sum on the order number that results in the getting output.

you can try below expression

Sum(sum(total Aggr(Sum( distinct {<SustainableLevel = {'Sustainable'}>}Weight),Fibres)))

 

Regards,
Abhijit
keep Qliking...
vinieme12
Champion III
Champion III

Sum(Aggr( Sum( distinct {<SustainableLevel = {'Sustainable'}>}Weight) , Fibres , "Portal Order No.")))

and change total  in chart to sum of rows

 

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
davyqliks
Specialist
Specialist
Author

Thank you for the reply,

This still returned the incorrect values:

davyqliks_0-1648800772008.png

 

 

I have been playing with the expression and found the below worked.

Really Appreciate all of your time and effort, i would not have got to the below without this help!

davyqliks_1-1648800903234.png

 


sum( Aggr(Sum( distinct {<SustainableLevel = {'Sustainable'}>}Weight),Fibres, "Portal Order No.") )

davyqliks
Specialist
Specialist
Author

Hi,

Thank you so mush, by trial and error i found the same but your help is very much appreciated.

Thank you