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

Expression not working with Only statement

Hello

I would like the following expression to interact with my master calender, but as the 2nd part of the expression cannot be a sum, I have tried using the Only function, but at this time I return no results

Could you kidnly take a look at the expression and let me know how I can get teh second part of the calculation to interact with the master calender?

 

Num(Sum({$<FactDateNum = {">=$(=v_Start_Date_Outpatients)<=$(=v_End_Date_Outpatients)"}>} Outpatient_Referrals.REFERRAL_TOTAL/

Only({$<FactDateNum = {">=$(=v_Start_Date_Outpatients)<=$(=v_End_Date_Outpatients)"}>} Outpatient_Referrals.Population_Stats1/1000)),0)

Kind Regards

Helen

2 Replies
Not applicable

Hi Helen

It's hard to answer without seeing your data model, but what are you expecting for the second part of expression to return if there are two or more distinct values?

Lukasz

SergeyMak
Partner Ambassador
Partner Ambassador

If Only() doesn't work, try Min() or Max().

In case of one value you have same result. In case of several values - it could be wrong result, but only you can understand how to handle this stuff.

Regards,

Sergey

Regards,
Sergey