Forum Discussion
AlessandroBet
Helper V
5 years agoTOTALYTD
Hi, i'm tring to work with TOTALYTD but it occurs an error on date parameter. My date format is like the picture this but it needs the following [date] format I cant ...
- 5 years ago
could you please provide the sample data and expected output?
ryan_mayu
Super User
5 years agodo you have a datetime table?
https://docs.microsoft.com/en-us/dax/totalytd-function-dax
maybe you can try
measure =
VAR _maxdate=max(Sales[date])
return sumx(FILTER(all(sales),Sales[date]=year(_maxdate)),Sales[Sales])
AlessandroBet
Helper V
5 years agothanx but please help me with teh following code
The mistake is at red text
IF(
ISFILTERED('Opportunities'[Actual Close Date]),
ERROR("Time intelligence quick measures can only be grouped or filtered by the Power BI-provided date hierarchy or primary date column."),
TOTALQTD(
SUM('Opportunities'[Actual Won Sales Price_Base]),
'Opportunities'[Actual Close Date]
)
)
- ryan_mayu5 years ago
Super User
maybe you can try to create a datetime table and change the red part to datetime date key
- AlessandroBet5 years ago
Helper V
I can't create tables because i have created a report starting form existing dataset
- ryan_mayu5 years ago
Super User
could you please provide the sample data and expected output?