Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Formula to Divide by Total Amount

Screen Shot.png

In the table above the column labeled 7Day% is using a formula (=FirstSortedValue(iHeadMort,Mort_dt) / SUM(Head_Start)) but I need it to divide by the total Head_Start (Head Placed) of 20,944 instead of the separate values of 19,250 and 1,694. Any ideas for how to divide each column by the total amount or at least get my total line to show the correct amount?  

1 Solution

Accepted Solutions
Colin-Albert

You need to add <>

=FirstSortedValue(iHeadMort,Mort_dt) / SUM(total <Project_#> Head_Start)

View solution in original post

7 Replies
joshabbott
Creator III
Creator III

Did you try:

sum(TOTAL [Head Placed])

Colin-Albert

try  =FirstSortedValue(iHeadMort,Mort_dt) / SUM(total Head_Start))

Anonymous
Not applicable
Author

Screenshot 2.pngScreen Shot.pngColin,

That works great when I only have this Project selected, but when I deselect it seems to recalculate using all the amounts.

Colin-Albert

If you want the total to be summed by the Project data then use

  =FirstSortedValue(iHeadMort,Mort_dt) / SUM(total <Project> Head_Start))

where Project is the fieldname for the Project data.  <[Group Cd]>

Anonymous
Not applicable
Author

That makes perfect sense.

I have put this in:

=FirstSortedValue(iHeadMort,Mort_dt) / SUM(total Project_# Head_Start)

It is not returning a value, so am I missing something between the Project_# and Head_Start? Thanks for your patience.

Colin-Albert

You need to add <>

=FirstSortedValue(iHeadMort,Mort_dt) / SUM(total <Project_#> Head_Start)

Anonymous
Not applicable
Author

That's it! thanks Colin, your the man!