Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I am working on a dashboard that shows our annual rate of follower growth on a daily level. I have calculated the measure for our followers total at the beginning of the year using the following formula.
Followers/Subscribers - Year Start = CALCULATE(SUM('Organic Social - NonAggregate Reach & Followers'[FollowersSubscribers]),'Date Table'[IsStartOfYear] = TRUE())
Where [IsStartOfYear] is referencing a Date table and using this formula:
IsStartOfYear = IF(AND('Date Table'[Date].[Date] = 'Date Table'[Start of Quarter].[Date],'Date Table'[Quarter Number] = 1),TRUE(),FALSE())
From there, I assumed I could calculate the YTD growth using this simple formula
Followers/Subscribers - Growth YTD = [Followers/Subscribers] - [Followers/Subscribers - Year Start]
The issue is that the "Year Start" value only applies for the first day of the year, and not the remaining days of the year. See table below:
Is there a way I can make this Year Start value a constant throughout the entire year? In this case, Year Start would be 232,729 for every day throughout the year. Ideally this would be based on what year I have selected from a Year slicer.
Solved! Go to Solution.
Hi @cgriffin
Thanks for the reply from @amitchandak , please allow me to provide another insight:
Please change the [Followers/Subscribers - Year Start] :
Followers/Subscribers - Year Start =
VAR _SOY =
STARTOFYEAR ( 'Date Table'[Date] )
RETURN
CALCULATE (
SUM ( 'Organic Social - NonAggregate Reach & Followers'[FollowersSubscribers] ),
FILTER ( ALLSELECTED ( 'Date Table' ), 'Date Table'[IsStartOfYear] = _SOY )
)
Here I create a set of sample for your reference:
Then add a measure:
MEASURE =
VAR _SOY =
STARTOFYEAR ( 'Table'[Date] )
RETURN
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] = _SOY )
)
The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
I used your first formula with one minor tweak, and that worked perfectly!
My date table actually didn't didnt have a Start of Year dimensions, so I had to add that first. I used this as my solution:
Followers/Subscribers - Year Start (REDO) =
VAR _SOY =
STARTOFYEAR ( 'Date Table'[Date] )
RETURN
CALCULATE (
SUM ( 'Organic Social - NonAggregate Reach & Followers'[FollowersSubscribers] ),
FILTER ( ALLSELECTED ( 'Date Table' ), 'Date Table'[Date].[Date] = _SOY )
)
Hi @cgriffin
Thanks for the reply from @amitchandak , please allow me to provide another insight:
Please change the [Followers/Subscribers - Year Start] :
Followers/Subscribers - Year Start =
VAR _SOY =
STARTOFYEAR ( 'Date Table'[Date] )
RETURN
CALCULATE (
SUM ( 'Organic Social - NonAggregate Reach & Followers'[FollowersSubscribers] ),
FILTER ( ALLSELECTED ( 'Date Table' ), 'Date Table'[IsStartOfYear] = _SOY )
)
Here I create a set of sample for your reference:
Then add a measure:
MEASURE =
VAR _SOY =
STARTOFYEAR ( 'Table'[Date] )
RETURN
CALCULATE (
SUM ( 'Table'[Value] ),
FILTER ( ALLSELECTED ( 'Table' ), 'Table'[Date] = _SOY )
)
The result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@cgriffin , try measures like
Start of year =
var _max = max('Date'[Date]
return
calculate([Followers/Subscribers] , 'Date'[Date] = ( eomonth(_max , -1* month(_max)) +1 ))
Or
Start of year =
var _max = max('Date'[Date]
return
calculate([Followers/Subscribers] , filter(all('Date') , 'Date'[Date] = ( eomonth(_max , -1* month(_max)) +1 )))
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Ask questions in Eventhouse and KQL, Eventstream, and Reflex.
User | Count |
---|---|
84 | |
83 | |
64 | |
60 | |
55 |
User | Count |
---|---|
179 | |
108 | |
105 | |
71 | |
70 |