Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good morning,
Who can help me with this problem i have.
For the calculation of the wault i use the next expression;
avg({$<CAMRULE_HCHARGECODE = {4,5,23}>}
if(LEN(TRIM(TENANT_DTBREAK)) = 0 AND TENANT_DTBREAK > floor(now()) and CAMRULE_RENT_YEAR > 0,
(TENANT_DTBREAK - floor(now())) / 365.25 * CAMRULE_RENT_YEAR,
if(TENANT_DTEXPIRATION > floor(now()) and CAMRULE_RENT_YEAR > 0,
(TENANT_DTEXPIRATION - floor(now())) /365.25 * CAMRULE_RENT_YEAR)))
/ CAMRULE_RENT_YEAR
This calculation does exactly what i would expect it to do but it's per tenant and when i remove the dimension tenant to see the wault for the selected properties all results will be removed.
May be this:
Sum(Aggr(
avg({$<CAMRULE_HCHARGECODE = {4,5,23}>}
if(LEN(TRIM(TENANT_DTBREAK)) = 0 AND TENANT_DTBREAK > floor(now()) and CAMRULE_RENT_YEAR > 0,
(TENANT_DTBREAK - floor(now())) / 365.25 * CAMRULE_RENT_YEAR,
if(TENANT_DTEXPIRATION > floor(now()) and CAMRULE_RENT_YEAR > 0,
(TENANT_DTEXPIRATION - floor(now())) /365.25 * CAMRULE_RENT_YEAR)))
/ CAMRULE_RENT_YEAR,
tenant))
Replace Sum with whatever outer aggregation makes sense for your case.
May be this:
Sum(Aggr(
avg({$<CAMRULE_HCHARGECODE = {4,5,23}>}
if(LEN(TRIM(TENANT_DTBREAK)) = 0 AND TENANT_DTBREAK > floor(now()) and CAMRULE_RENT_YEAR > 0,
(TENANT_DTBREAK - floor(now())) / 365.25 * CAMRULE_RENT_YEAR,
if(TENANT_DTEXPIRATION > floor(now()) and CAMRULE_RENT_YEAR > 0,
(TENANT_DTEXPIRATION - floor(now())) /365.25 * CAMRULE_RENT_YEAR)))
/ CAMRULE_RENT_YEAR,
tenant))
Replace Sum with whatever outer aggregation makes sense for your case.
Hi there Sunny T,
Thanks for your comment. this should do the trick.
If your question is now answered, please flag the Correct Answer.
If not, please make clear what part of this topic you still need help with .
Hello Onno,
Thank you for your comment, I've set the Correct Answer flag.