Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I need to calculate and show the closing month headcount of previous fiscal years which should dynamically change if we select any fiscal quarter or month accordingly. But in the first look in a Bar-graph, it should only show the Closing month i.e. march month Headcount.
Currently, I'm using the following logic:
pick(vMeasure,
Count({$<[Fiscal Month]={'Mar'}>}distinct [PS No])-Count({$<[Fiscal Month]={'Mar'},EXT_Flag={'External'}>}distinct [PS No]))
where I am getting the closing month headcount without externals(External employees) correctly but if i select other selections like Month and quarter it will not change accordingly.
Hope I explained it properly and looking forward to suggestions.
Thank you.
Hello,
Try like this:
Count({$<[FiscalMonthNUM]={$(=Max(FiscalMonthNUM))}>}distinct [PS No])-Count({$<[FiscalMonthNUM]={$(=Max(FiscalMonthNUM))},EXT_Flag={'External'}>}distinct [PS No])
Best regards
Hugo Romeira
its is not changing because you have hardcoded Month ='Mar'
if you need it to be flexible you need to remove the hardcoded month filter from set analysis
Change it to below
If there are selections, calculate for latest month else evaluate for Mar
=if(getselectedcount(Month) or getselectedcount(Year) or getselectedcount(Quarter)
, Count({<[Fiscal Month]={"=Max(Month)"}>}distinct [PS No])-Count({<[Fiscal Month]={"=Max(Month)"},EXT_Flag={'External'}>}distinct [PS No])
,Count({$<[Fiscal Month]={'Mar'}>}distinct [PS No])-Count({$<[Fiscal Month]={'Mar'},EXT_Flag={'External'}>}distinct [PS No])
)
Hello,
From what I understand, your Fiscal Month field contains the Month short Name (Jan, Mar, May, etc), which is a string.
If you have any other "numeric" calendar dimension you should use it to get a max month/date logic.
If you create YearMonth field to look like 202203 YYYYMM (2022 March), you could than dinamically calculate the max available month.
Count({$<[YearMonth]={$(=Max(YearMonth))}>}distinct [PS No])-Count({$<[Fiscal Month]={$(=Max(YearMonth))},EXT_Flag={'External'}>}distinct [PS No])
Hope it helps.
Thank you for your response... I tried your solution, This is also giving the same result as i was getting earlier only march month data is flowing and it is not changing dynamically when i select any month or quarter for a particular fiscal year.
Let me know if you get any other solution for this. we also have a numeric calendar dimension i.e. "MonthYear", if we can use this to get the desired solution.
Thank you
Hi Thank you for your response we do have a calendar field "MonthYear" i tried you solution with that , It isn't working for me...Let me know if you come up with any other solution for this..
Thank you
I will be glad to help.
Could you please share a print with the some sample data on your calendar dimension?
Best regards
Hugo Romeira
sure , kindly check this.
Thank you.
Hello,
Try like this:
Count({$<[FiscalMonthNUM]={$(=Max(FiscalMonthNUM))}>}distinct [PS No])-Count({$<[FiscalMonthNUM]={$(=Max(FiscalMonthNUM))},EXT_Flag={'External'}>}distinct [PS No])
Best regards
Hugo Romeira
Yes , I think this is working.
Thank you so much for this 🙌