The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi
i would like to show a cumulative value for 2020 only (01.01.20 - 31.01.2020) and a cumulative value starting from 2021 (into 2022 and ongoing)
I could calculate both, but in the visualization the 2020 value keeps going on. I could not find a way to make it end at 31.12.2020.
Solved! Go to Solution.
@Fabrizio Maybe:
Running Total 2020 =
VAR __Date = MAX('Date'[Date])
RETURN
IF(__Date > DATE(2020,12,31), BLANK(),CALCULATE([MEASURE],
FILTER(ALLSELECTED('Date'), 'Date'[Date] <= MAX('Date'[Date])), 'Date'[Year]=2020))
@Fabrizio Maybe:
Running Total 2020 =
VAR __Date = MAX('Date'[Date])
RETURN
IF(__Date > DATE(2020,12,31), BLANK(),CALCULATE([MEASURE],
FILTER(ALLSELECTED('Date'), 'Date'[Date] <= MAX('Date'[Date])), 'Date'[Year]=2020))