Forum Discussion

AH2022's avatar
AH2022
Icon for Helper II rankHelper II
2 years ago
Solved

New Time Intelligence Calculation Group (Model explorer) PY YTD

Hi all,

I applied the new feature Time Intelligence calculation group from the Model view.

Deep dive into the Model Explorer with calculation group authoring and creating relationships in the properties pane | Microsoft Power BI Blog | Microsoft Power BI

I calculate YTD:

YTD =

CALCULATE(

    SELECTEDMEASURE(),

    DATESYTD(DimDates[Date])

)

 

How do I write YTD for the previous year please ?

Year-1 YTD =
CALCULATE (
    SELECTEDMEASURE (),
    SAMEPERIODLASTYEAR ( DimDates[Date] ),
    'Time Intelligence'[Show as] = "YTD"
)

I have scoured the web looking for an answer on this topic and I tried different solutions, with no success. (I found examples for time intelligence measures, which do not meet the need.)

https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000

https://community.powerbi.com/t5/Quick-Measures-Gallery/Time-Intelligence-quot-The-Hard-Way-quot-**bleep**...

Usually Previous Year is calculated:

YearAgo = CALCULATE([Measure YTD], DATEADD(DimDates[Date], -1, YEAR))

 

but in this case we don’t specify the measure, we use selectedmeasure ()

how do we “translate” 'Time Intelligence'[Show as] = "YTD".

 

Any help would be much appreciated.

Thank you.

 

 

2 Replies