Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
GrantBooth
Creator
Creator

Calculate value based on adjacent column in straight table

Still getting used to Qlik so please forgive me if this is an easy question.

I'm trying to calculate a value based on two values loaded into a straight column

month_end_dateftp_rpt_level_4NII - Mortgage Fixedday(month_end_date)
2020-07-31Mortgage - Fixed$2,290,87231
2020-08-31Mortgage - Fixed$2,421,53131
2020-09-30Mortgage - Fixed$2,422,78530
2020-11-30Mortgage - Fixed$2,586,06330
2020-10-31Mortgage - Fixed$2,610,91431
2020-12-31Mortgage - Fixed$2,919,31831
2021-02-28Mortgage - Fixed$3,040,46128
2021-06-30Mortgage - Fixed$3,225,08030
2021-01-31Mortgage - Fixed$3,304,49531
2021-07-31Mortgage - Fixed$3,380,27631
2021-04-30Mortgage - Fixed$3,388,30630
2021-03-31Mortgage - Fixed$3,547,11931
2021-05-31Mortgage - Fixed$3,550,50131

 

I would like to be able to calculate NII - Mortgage Fixed divided by day(month_end_date) for each of the months listed and I'm stuck about the next steps. I'd prefer if the calculation can be done as an expression rather than ammending load data.

1 Solution

Accepted Solutions
Kushal_Chawda

@GrantBooth  try below

Sum({<ftp_rpt_level_4 = {"Mortgage - Fixed"}>} nii_00_gross_interest)/

day(aggr(only({<ftp_rpt_level_4 = {"Mortgage - Fixed"}>} month_end_date),month_end_date,ftp_rpt_level_4))

Got to  Add-on in table properties and uncheck "Include zero values" option

View solution in original post

5 Replies
lironbaram
Partner - Master III
Partner - Master III

you can do it by this expression :
column(3)/ column(4)
or you can use the fields titles 
[NII - Mortgage Fixed]/[day(month_end_date)]

GrantBooth
Creator
Creator
Author

Thanks for the response, your answer makes it seem as basic as I would have expected however I simply can't make it work.

To give further context, the NII column is the result of a filtered sum

Sum({<ftp_rpt_level_4 = {"Mortgage - Fixed"}>} nii_00_gross_interest)

And the Days field is just the day funtion

=day(month_end_date)

I have tried adding a new column as both a measure and a dimension with no results

I've tried just a basic operator to column three, Column(3) + 1, and I still get no information. I feel like I'm missing something but I can't for the life of me work out what

06ded33816644e4b9d961c6bd3c6b0d5.png

 

 

 

 

 

 

 

 

Kushal_Chawda

@GrantBooth  what do you get if you use below as measure?

Sum({<ftp_rpt_level_4 = {"Mortgage - Fixed"}>} nii_00_gross_interest)/day(month_end_date)

GrantBooth
Creator
Creator
Author

So it turns out that the results were there, I was just not scrolling in the table. It's working now, however now I have a new problem in that all of the values of column 2 are being returned, not just the ones I wanted to filter on

d8c6498753af49fe868d35a2300993f4.jpg

So now I've got the new problem of removing the unwanted rows

Kushal_Chawda

@GrantBooth  try below

Sum({<ftp_rpt_level_4 = {"Mortgage - Fixed"}>} nii_00_gross_interest)/

day(aggr(only({<ftp_rpt_level_4 = {"Mortgage - Fixed"}>} month_end_date),month_end_date,ftp_rpt_level_4))

Got to  Add-on in table properties and uncheck "Include zero values" option