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

Expression to achieve the in text box - for the latest Financial Year and Finanacial Month

Hi All,

I want to achieve the result 16 % at the text box in my chart -

Here is the expression - 

=Num(Aggr(Count({<NextWardIdentifier={'TLR','TRANSIT','HKHTL'},[Ward Episode End Date.FinancialYear]={'$(=Max([Ward Episode End Date.FinancialYear]))'},[Ward Episode End Date.Month]={'$(=Max([Ward Episode End Date.Month]))'}>}[Total Ward Episodes])/(Count({<NextWardIdentifier={'TLR','TRANSIT','HKHTL','NA'},[Ward Episode End Date.FinancialYear]={'$(=Max([Ward Episode End Date.FinancialYear]))'},[Ward Episode End Date.Month]={'$(=Max([Ward Episode End Date.Month]))'}>}[Total Ward Episodes]) - Count({<NextWardIdentifier={'NA'},[Episode Mode of Separation Code]={'9'},[Ward Episode End Date.FinancialYear]={'$(=Max([Ward Episode End Date.FinancialYear]))'},[Ward Episode End Date.Month]={'$(=Max([Ward Episode End Date.Month]))'}>} [Total Ward Episodes])),[Ward Episode End Date.FinancialYear],[Ward Episode End Date.Month] ) ,'#,##0.#%')

 

Dim : =[Ward Episode End Date.Month],=[Ward Episode End Date.FinancialYear]

 

yeae.PNG

 

Thanks in advance

1 Solution

Accepted Solutions
MayilVahanan

Hi

PFA

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.

View solution in original post

6 Replies
MayilVahanan

Hi

Try like Avg() or Count() or sum() before Aggr() based on ur requirement

=Num(Avg(Aggr(Count({<NextWardIdentifier={'TLR','TRANSIT','HKHTL'},[Ward Episode End Date.FinancialYear]={'$(=Max([Ward Episode End Date.FinancialYear]))'},[Ward Episode End Date.Month]={'$(=Max([Ward Episode End Date.Month]))'}>}[Total Ward Episodes])/(Count({<NextWardIdentifier={'TLR','TRANSIT','HKHTL','NA'},[Ward Episode End Date.FinancialYear]={'$(=Max([Ward Episode End Date.FinancialYear]))'},[Ward Episode End Date.Month]={'$(=Max([Ward Episode End Date.Month]))'}>}[Total Ward Episodes]) - Count({<NextWardIdentifier={'NA'},[Episode Mode of Separation Code]={'9'},[Ward Episode End Date.FinancialYear]={'$(=Max([Ward Episode End Date.FinancialYear]))'},[Ward Episode End Date.Month]={'$(=Max([Ward Episode End Date.Month]))'}>} [Total Ward Episodes])),[Ward Episode End Date.FinancialYear],[Ward Episode End Date.Month] ) ),'#,##0.#%')

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
ashmitp869
Creator II
Creator II
Author

Hi Mayil,

its not working. its showing 0.0 % when trying with Count() and Sum().

Even if I selected the Year and Month.

sel.PNG

 

zero.PNG

MayilVahanan

Can you send the sample file to verify?

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
ashmitp869
Creator II
Creator II
Author

Hi Mayil,

Here i s the sample.

MayilVahanan

Hi

PFA

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
ashmitp869
Creator II
Creator II
Author

Thank you very much.