Currently, I have these measures. Actuals Month show the results from the prior month, not the current. Actuals QTR to Date show Oct and Nov if currently in Dec. YTD Actuals show Jan - Nov if currently in Dec.
Now, I need to give the user a QtrYear filter, so they can look back at prior quarters. I would need these three measures to change with the users selection of QtrYear. So, if they choose 3rd quarter of 2020, the Actuals Month would display September(last completed month of quarter), Actuals QTR to Date would show the entire 3rd quarter, and the YTD Actuals would show Jan - September. Any suggestions?
Actuals Month =
CALCULATE(
[Net Debit / Credit ($)]*-1,
YEAR(āPosting Periodā[*Date (period)]) = YEAR(TODAY()),
MONTH(āPosting Periodā[*Date (period)]) = MONTH(TODAY())-1)Actuals QTR to Date =
VAR Quarter1 = IF( MONTH(TODAY()) = 1, 4, IF(MONTH(TODAY()) in {4,7,10}, QUARTER(TODAY())-1, QUARTER(TODAY())))
VAR Year1 = IF(MONTH(TODAY()) = 1, YEAR(TODAY())-1,YEAR(TODAY()))
VAR Month1 = IF(MONTH(TODAY()) = 1, 13, MONTH(TODAY()))
RETURN
CALCULATE(
[Net Debit / Credit ($)]*-1,
YEAR(āPosting Periodā[*Date (period)]) = Year1 ,
MONTH(āPosting Periodā[*Date (period)]) < Month1 ,
QUARTER(āPosting Periodā[*Date (period)]) = Quarter1)YTD Actuals =
VAR Year1 = IF(MONTH(TODAY()) = 1, YEAR(TODAY())-1,YEAR(TODAY()))
VAR Month1 = IF(MONTH(TODAY()) = 1, 13, MONTH(TODAY()))
RETURN
CALCULATE(
[Net Debit / Credit ($)]*-1,
YEAR(āPosting Periodā[*Date (period)]) = Year1,
MONTH(āPosting Periodā[*Date (period)]) < Month1)