Question
Hi I need help to edit this so I can by pass a filter on the page level which is Calendar Year. Currently this formula
Hi I need help to edit this so I can by pass a filter on the page level which is Calendar Year.
Currently this formula will take the data within the start and end date (then divide by 12) This will be okay if the page filter has more than 12 months but I wanted to still default that to ignore the page filter start date but do last 12 months count from the end date. Can someone help?
Screenshot will show the PYL12Month will only be accurate when we select all three CY but not when only CY2022 and CY2023 because the page filter already filter out the data set..... I was researching into removefilters or allexcept but won't work.
Employee Count Active PY Last 12 Month TT =
VAR __sum = 0
//generate table with Mo/Yr and Distinct COUnt
var result = SUMMARIZE(HRData,ROLLUP(HRData[Mo/Yr]),"COUNT", CALCULATE(
DISTINCTCOUNT(HRData[ExponentHR ID]),
KEEPFILTERS(HRData[Employee Status] = "Active"))+0)
//keep calculate data
var result2 = FILTER(result,AND([COUNT] > 0,[COUNT] MAXX(result,[COUNT])))
//get current,prev,prev2 date in data
var currentdate = MAXX(result2,[Mo/Yr])
var prevdate = currentdate - 365
var prevdate2 = prevdate - 365
var result3 = FILTER(result,AND(AND([Mo/Yr] prevdate2),[COUNT] MAXX(result,[COUNT])))
//var result3 = FILTER(result,AND(AND([Mo/Yr] prevdate),[COUNT] MAXX(result,[COUNT])))
var result4 = ADDCOLUMNS(result3,"__sum",__sum + SUMX(FILTER(result3,[Mo/Yr]
VAR __max = MAXX(result4,[__sum])
RETURN
// Return the average by divide by 12
__max/12
(i.i.i.i.i.i.i.i. Imudiuiuaitilititiil-dudidididStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started