Forum Discussion
Anonymous
4 years agoNot applicable
Prevent spliting when using LYTD (pbix attached)
I have this pbix : https://drive.google.com/file/d/1tpGKvL_ST1L7YgDkDFqqLqfKb0FEjfcL/view?usp=sharing I have a single selection filter on Year, and when I select 2021: My goal is to ...
Anonymous
4 years agoNot applicable
Thanks for your answer BeaBF ,
My expected output is:
(when 2021 is selected):
When 2020 is selected... it should work as it is already working:
PaulOlding
Solution Sage
4 years agoThis measure gets your example result.
It first builds a table of Revenue LYTD for each inscope customer ignoring Type, then aggregates for the final result.
Net Revenue LYTD =
VAR _CustomerLYTD =
ADDCOLUMNS(
VALUES(Revenue[Customer]),
"@LYTD", CALCULATE([Net Revenue YTD], SAMEPERIODLASTYEAR('Date'[Date]), REMOVEFILTERS('Type') )
)
VAR _Result = SUMX(_CustomerLYTD, [@LYTD])
RETURN
_Result