Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to calculate gender ratio here for the Male and female Icons as shown in the Image, The only condition is that by default it should show FY 2021-22 "March" data and it should change dynamically based on the Year, month, quarter selections.
Below is the current script which is being used to calculate only for March 2021-22 , Let me know what changes i need to do in the current script order to get the desired output.
Count({$<[Fiscal Month]={'Mar'},Gender={'M'},FiscalYear={'2021-22'}>}distinct [PS No])-Count({$<[Fiscal Month]={'Mar'},Gender={'M'},FiscalYear={'2021-22'},EXT_Flag={'External'}>}distinct [PS No]))
/(Count({$<[Fiscal Month]={'Mar'},FiscalYear={'2021-22'}>}distinct [PS No])-Count({$<[Fiscal Month]={'Mar'},FiscalYear={'2021-22'},EXT_Flag={'External'}>}distinct [PS No]))
Thanks & regards,
Manmeet Dhawan
HI @Manmeet
At a glance that should give you default results, you would need to then wrap an if around it to remove the set express for Fiscal year and month if a selections is made something like.
IF(GetSelectedCount([Fiscal Month]) > 0 AND GetSelectedCount([Fiscal Year]) > 0,
Count({$<,Gender={'M'},>}distinct [PS No])-Count({$<,Gender={'M'},EXT_Flag={'External'}>}distinct [PS No]))
/(Count({$<>}distinct [PS No])-Count({$<EXT_Flag={'External'}>}distinct [PS No])),
Count({$<[Fiscal Month]={'Mar'},Gender={'M'},FiscalYear={'2021-22'}>}distinct [PS No])-Count({$<[Fiscal Month]={'Mar'},Gender={'M'},FiscalYear={'2021-22'},EXT_Flag={'External'}>}distinct [PS No]))
/(Count({$<[Fiscal Month]={'Mar'},FiscalYear={'2021-22'}>}distinct [PS No])-Count({$<[Fiscal Month]={'Mar'},FiscalYear={'2021-22'},EXT_Flag={'External'}>}distinct [PS No]))
)
Hi Thanks for your suggestion , should i use the same script or do i need to modify something in it?
Because i used the same script and it isn't giving any output.
Please check