Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I created a table to show current timeframe and comparison timeframe revenues. Comparison values are received when comparing 1/1/2022 through 2/14/2022 vs. 1/1/2021 through 2/14/2021 but not for 1/1/2023 through 2/14/2023 vs. 1/1/2022 through 2/14/2022. (Please see below.) I have checked my Calendar and Comparison Calendar and cannot find any errors.
The formula I used for Comparison Timeframe is
I would appreciate if anyone has an idea of where I should check next.
--------------------------------------------------------------------------------------------------------------------------
Solved! Go to Solution.
Hi @stuart765 ,
Here I create a sample to have a test.
Measure:
Comparison Timeframe =
VAR _START =
MIN ( 'Calendar'[Date] )
VAR _END =
MAX ( 'Calendar'[Date] )
VAR _PREVIOUSSTART =
DATE ( YEAR ( _START ) - 1, MONTH ( _START ), DAY ( _START ) )
VAR _PREVIOUSEND =
DATE ( YEAR ( _END ) - 1, MONTH ( _END ), DAY ( _END ) )
RETURN
CALCULATE (
[Timeframe],
FILTER (
ALL ( 'Calendar' ),
AND ( 'Calendar'[Date] >= _PREVIOUSSTART, 'Calendar'[Date] <= _PREVIOUSEND )
)
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @stuart765 ,
Here I create a sample to have a test.
Measure:
Comparison Timeframe =
VAR _START =
MIN ( 'Calendar'[Date] )
VAR _END =
MAX ( 'Calendar'[Date] )
VAR _PREVIOUSSTART =
DATE ( YEAR ( _START ) - 1, MONTH ( _START ), DAY ( _START ) )
VAR _PREVIOUSEND =
DATE ( YEAR ( _END ) - 1, MONTH ( _END ), DAY ( _END ) )
RETURN
CALCULATE (
[Timeframe],
FILTER (
ALL ( 'Calendar' ),
AND ( 'Calendar'[Date] >= _PREVIOUSSTART, 'Calendar'[Date] <= _PREVIOUSEND )
)
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
98 | |
76 | |
74 | |
49 | |
26 |