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.
Hi Team,
I'm trying to get the YTD Totals as of today()'s date shown in cards, but it's only showing the overall total. The idea is it automatically based on the current date. For example below, it's May 15, the YTD should be 217M (not including the blanks).
Is there a way to do this? I have several other cards related to this that I need to be able to only show the totals as of today.
Solved! Go to Solution.
@Nogstai ,
Option 1
YTD Today =
var _min = eomonth(today(),-1*month(today()))+1
var _max = today()
return
CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))
If date is selected
YTD Today =
var _min = eomonth(today(),-1*month(today()))+1
var _max = today()
return
CALCULATE([Net], FILTER(all('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max))
Use selected date else today
YTD =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min = eomonth(_max,-1*MONTH(_max))+1
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
All About Time Intelligence around Today: https://youtu.be/gcLhhxhXKEI
@Nogstai ,
Option 1
YTD Today =
var _min = eomonth(today(),-1*month(today()))+1
var _max = today()
return
CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))
If date is selected
YTD Today =
var _min = eomonth(today(),-1*month(today()))+1
var _max = today()
return
CALCULATE([Net], FILTER(all('Date'),'Date'[Date] >=_min && 'Date'[Date] <= _max))
Use selected date else today
YTD =
var _max = if(isfiltered('Date'),MAX( 'Date'[Date]) , today())
var _min = eomonth(_max,-1*MONTH(_max))+1
return
CALCULATE([net] ,DATESBETWEEN('Date'[Date],_min,_max))
All About Time Intelligence around Today: https://youtu.be/gcLhhxhXKEI
Hi @amitchandak ,
Just going back here, I'm trying to undersand each DAX you created and why was it put there. I was trying to understand each line and I know the functions, but together it didn't make sense. Can you help me understand each? I don't just want to copy it, I want to see the logic for it.
Option 1
YTD Today =
var _min = eomonth(today(),-1*month(today()))+1
var _max = today()
return
CALCULATE([Net], FILTER('Date','Date'[Date] >=_min && 'Date'[Date] <= _max))
The first one completely worked! I appreciate that and I also watched your tutorial, big help in getting YTD results for my dashboard!
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 |
---|---|
85 | |
83 | |
66 | |
60 | |
58 |
User | Count |
---|---|
194 | |
111 | |
105 | |
79 | |
71 |