Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

YTD calculation for Roleplaying Dimensions

The data is about failures in equipment. I have two dates failuredate and firststartdate and column installType to identify it is new or replacement.

I have created active relationship as failuredate and inactive relationship as firststartdate.

I want to calculate
YTD of new and replacement equipment.

CountNR = calculate( countA(ID), InstallType="new" || InstallType="replace", userelationship)

CountNR_FIrstStart= calculate(CountNR, userelationship (Firststartdate,Dimdate[date]))


YTDNR= TotalYTD(CountNR_FirstStart, Firststartdate,"3/31")

This works fine without filter Fiscalyear from dimdate.
When we filter previous fiscal year YTDNR returns incorrect results.
I hope when we filter the fiscal year records are filter based on failuredate since it is active relationship.

So, how to calculate YTD for inactive date dimension.
No Replies