Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Stickman
Contributor II
Contributor II

If Null expression

Hi everyone - looking to get some help with this expression

What I'm trying to show is a value of the vMaxSelectedDate calculation if the first calculation shows a null.

The first calculation takes the last day of the month

The second calculation takes the last selected day of the month.

I hope the below expression is clear for you to read. Please let me know if there are any questions.

 

=if((sum({$<LAST_WORKING_DAY_MONTH={1},FactTypeID={1},bRentable={Y}>}dcMonthlyRate*Occ_Flag)
/
sum({$<LAST_WORKING_DAY_MONTH={1},FactTypeID={1},bRentable={Y}>}Occ_Flag)) <=0,

(sum({$<Date={'$(vMaxSelectedDate)'}>}dcMonthlyRate*Occ_Flag)
/
sum({$<FactTypeID={1},bRentable={Y},Date={'$(vMaxSelectedDate)'}>}Occ_Flag)),

(sum({$<LAST_WORKING_DAY_MONTH={1},FactTypeID={1},bRentable={Y}>}dcMonthlyRate*Occ_Flag)
/
sum({$<LAST_WORKING_DAY_MONTH={1},FactTypeID={1},bRentable={Y}>}Occ_Flag)))

 

 

 

The result I get shows the months up to the last selected month, at which point it shows a null value.

Labels (2)
1 Reply
Brett_Bleess
Former Employee
Former Employee

It will likely help if you can attach the qvw file or a sample one with the data model etc. as well.  This generally makes it easier for folks to help, as they can look everything over to be sure they are providing the correct solution...

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.