Forum Discussion
Anonymous
4 years agoNot applicable
Dax problem
Is it possible that YTD and QTD result comes same ??? I have created dax for YTD = TotalYTD(sumx(sales, sales), orderdate.[date]) and for QTD = TotalQTD( sumx(sales,sales), orderdate.[date]) ...
Fowmy
4 years agoSuper User
Anonymous
Yes, it is possible in the 1st quarter.
You need to provide the name of a column containing dates or a one-column table containing dates. The SUMX also needs to be corrected.
Your measure shoudl go like: YTD = TOTALYTD ( SUMX ( sales, sales[value] ), dates[date] )
You can create a calendar table with the following code. Change the date range as required.
Dates =
ADDCOLUMNS(
CALENDAR("01/01/2020","31/12/2021"),
"Month", MONTH([Date]),
"Month Name", FORMAT([Date],"Mmmm"),
"Year", YEAR([Date]),
"Year Month No", YEAR([Date]) * 100 + MONTH([Date]),
"Year Month" , FORMAT([Date] , "Mmm yyyy" )
)
Anonymous
4 years agoNot applicable
It hasn't worked still I am getting the same result.
and with the master calendar, QTD becomes blank.
what to do??