Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a filter 'WC_Claims', based on the option selected on filter I am displaying INDEMNITY, MEDICAL & GROSS_AMOUNT values using
GetFieldSelections within year range (start and end year taken into variables Eg. 2015 to 2016) correctly as below.
=If(GetFieldSelections(WC_Claims, '|') = 'Indemnity',
sum({<YEAR={'>=$(=vStartYear)<=$(=vEndYear)'}>}[INDEMNITY]),
If(GetFieldSelections(WC_Claims, '|') = 'Medical',
sum({<YEAR={'>=$(=vStartYear)<=$(=vEndYear)'}>} [MEDICAL]),
sum({<YEAR={'>=$(=vStartYear)<=$(=vEndYear)'}>} GROSS_AMOUNT))
When I am trying to simulate the same logic for Month range (From and To Accounting month taken from multi-box filters Eg. Mar-2015 to Mar-2016) using below approach. it is not working. Getting all month's values irrespective of From and To month range.
=If(GetFieldSelections(WC_Claims, '|') = 'Indemnity',
sum({<ACCOUNTING_MONTH={'>=$(=GetFieldSelections(From_Accounting_Month))<=$(=GetFieldSelections(To_Accounting_Month))'}>} [INDEMNITY]),
If(GetFieldSelections(WC_Claims, '|') = 'Medical',
sum({<ACCOUNTING_MONTH={'>=$(=GetFieldSelections(From_Accounting_Month))<=$(=GetFieldSelections(To_Accounting_Month))'}>} [MEDICAL]),
sum({<ACCOUNTING_MONTH={'>=$(=GetFieldSelections(From_Accounting_Month))<=$(=GetFieldSelections(To_Accounting_Month))'}>} GROSS_AMOUNT))
I am not sure what going wrong. Can someone pls help me. Thanks in Advance.
Note: If I directly use the below expression, it is working correctly
sum({<ACCOUNTING_MONTH={'>=$(=GetFieldSelections(From_Accounting_Month))<=$(=GetFieldSelections(To_Accounting_Month))'}>} GROSS_AMOUNT)
Then, I am not sure the use of Pipe( | ) symbol this case, May be try this? I just remove the symbol in syntactically
=If(GetFieldSelections(WC_Claims) = 'Indemnity',
sum({<ACCOUNTING_MONTH={'>=$(=GetFieldSelections(From_Accounting_Month))<=$(=GetFieldSelections(To_Accounting_Month))'}>} [INDEMNITY]),
If(GetFieldSelections(WC_Claims) = 'Medical',
sum({<ACCOUNTING_MONTH={'>=$(=GetFieldSelections(From_Accounting_Month))<=$(=GetFieldSelections(To_Accounting_Month))'}>} [MEDICAL]),
sum({<ACCOUNTING_MONTH={'>=$(=GetFieldSelections(From_Accounting_Month))<=$(=GetFieldSelections(To_Accounting_Month))'}>} GROSS_AMOUNT))
Hi Anil,
Still the same result, Getting all values irrespective of From and To date range.
I need data within the date range, Is there any alternate way I can use?
The above condition what i gave is If we selected from WC_Claims value called Indemnity, Then we have to show first condition. Just use this and please select Indemnity from WC_Claims. Whether it is working or not.
=If(GetFieldSelections(WC_Claims) = 'Indemnity',
sum({<ACCOUNTING_MONTH={'>=$(=GetFieldSelections(From_Accounting_Month))<=$(=GetFieldSelections(To_Accounting_Month))'}>} [INDEMNITY]))
Yes Anil, When I bring this condition(Indemnity alone and Full condition) in expression and enable the column, I'm seeing data for all month's, not just values within the range.
same happening upon Indemnity option selected.
Would you able to provide the MOC for testing?
Security guidelines restrict me to upload file with sample data, I will prepare the data in-line and provide.
try below
sum({<ACCOUNTING_MONTH={'>=$(=max(From_Accounting_Month))<=$(=max(To_Accounting_Month))'}>} [INDEMNITY])
Hi Kushal,
Still the same result, Getting all month's values upon enabling the column and Indemnity option selection
what is the format of ACCOUNTING_MONTH,From_Accounting_Month and To_Accounting_Month are all these fields in proper format. Take all these fields in list box check they are right aligned. if so they are in proper format