Forum Discussion
IamTDR
Responsive Resident
2 years agoDAX Help: Running YTD Total by Day
Looking for help on this Dax Measure I wrote. Below is the Measure that Needs Adjusting Note - Company Fiscal Year is May - April PY Net Sales = SWITCH([Selected Period], "MTD", CALCULATE(SUM(S...
- Anonymous2 years ago
Hi,
Thanks for the solution Greg_Deckler and 123abc offered and i want to offer some more information for user to refer to.
hello IamTDR , you can create the following measure
MEASURE = VAR a = CALCULATE ( MIN ( Dim_Date[Date] ), ALL ( Dim_Date ), Dim_Date[Fiscal Year] = 2024 ) RETURN IF ( SUM ( 'Table'[sales_net] ) <> BLANK () && MAX ( Dim_Date[Fiscal Year] ) = 2024, CALCULATE ( SUM ( 'Table'[sales_net] ), FILTER ( Dim_Date, [Date] >= a && Dim_Date[Date] <= EDATE ( TODAY (), -12 ) ) ) )Ouptut
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
2 years agoNot applicable
Hi,
Thanks for the solution Greg_Deckler and 123abc offered and i want to offer some more information for user to refer to.
hello IamTDR , you can create the following measure
MEASURE =
VAR a =
CALCULATE (
MIN ( Dim_Date[Date] ),
ALL ( Dim_Date ),
Dim_Date[Fiscal Year] = 2024
)
RETURN
IF (
SUM ( 'Table'[sales_net] ) <> BLANK ()
&& MAX ( Dim_Date[Fiscal Year] ) = 2024,
CALCULATE (
SUM ( 'Table'[sales_net] ),
FILTER ( Dim_Date, [Date] >= a && Dim_Date[Date] <= EDATE ( TODAY (), -12 ) )
)
)
Ouptut
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
IamTDR
Responsive Resident
2 years agoThanks all for the much needed help on this!