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

Hi I need help to edit this so I can by passa filter on the page level which is Calendar Year. Currently this

(i.i.i.i.i.i.i.i. Imudiuiuaitilititiil-dudididid

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!