Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello,
which dax function do I have to use to get my table to show me the values in YTD.
I have always added it manually for each year.
values to be displayed in YTD for the last three years
Plot with year and month from date table you will get YTD for all year
If you want to remove December every year
YTD Corrected =
var _max = format(today(),"YYYYMM")
return
calculate(Sum('order'[Qty]),DATESYTD('Date'[Date]),format('Date'[Date],"YYYYMM")<=_max)
or
YTD Corrected =
var _max = format(today(),"YYYYMM")
return
if(format(max('Date'[Date]),"YYYYMM")<=_max, calculate(Sum('order'[Qty]),DATESYTD('Date'[Date])),blank())
Can anyone else help me?
@DagdasAlbag , is datesytd not working for you
YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))
or like
YTD QTY forced=
var _max = today()
return
calculate(Sum('order'[Qty]),DATESYTD('Date'[Date]),'Date'[Date]<=_max)
with date table, Take year and month also from date table
To get the best of the time intelligence function. Make sure you have a date calendar and it has been marked as the date in model view. Also, join it with the date column of your fact/s. Refer :radacad sqlbi My Video Series Appreciate your Kudos.
Hello,
unfortunately it still does not work as it should.
if I use the following formula, I only get the year 2020. But I would like to get every three years after YTD
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
49 | |
26 | |
21 | |
16 | |
12 |
User | Count |
---|---|
57 | |
49 | |
44 | |
19 | |
18 |