Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Community,
I have a measure with below code.
Count({<FinancialYearH = {"$(=getfieldselections(FinancialYearLF))"}>} HAZARD_ID)
I am forcing to get hazard count of particular FY. So achieve this, I have created a filter on "FinancialYearLF" field with option of always select only one. So user will get only one FY count at time. But the requirement changed now and users want to select one or multiple Financial Years at any time. Is there a work around to get this? If nothing is selected, then count is getting 0 and I don't want that. It should be fine even if all years are selected in beginning and allowing users to toggle between different financial years.
If don't use above condition, and simply use count(HAZARD_ID), I am not getting the right number.
Is there a way to select more than one value in a filter by default?
Try this
Count(
{
<FinancialYearH =
{"=if(GetSelectedCount(FinancialYearLF), Match(FinancialYearH, '$(=Concat(DISTINCT FinancialYearLF, "','"))')"}
>
}
HAZARD_ID
)
We dont know your data model so it is hard to say more, but if your requirement is to force FinancialYearH to filter based on FinancialYearLF values then below is one of the options aas long as both fields are actually of the same type:
Count({<FinancialYearH = P(FinancialYearLF)>} HAZARD_ID)
cheers
Try this
Count(
{
<FinancialYearH =
{"=if(GetSelectedCount(FinancialYearLF), Match(FinancialYearH, '$(=Concat(DISTINCT FinancialYearLF, "','"))')"}
>
}
HAZARD_ID
)
We dont know your data model so it is hard to say more, but if your requirement is to force FinancialYearH to filter based on FinancialYearLF values then below is one of the options aas long as both fields are actually of the same type:
Count({<FinancialYearH = P(FinancialYearLF)>} HAZARD_ID)
cheers
Thanks community. Both solutions worked for me.