Forum Discussion
sum week end value at monday
- 7 years ago
Hi and thank you for your answer!!
I have a problem with this peace of DAX:
FILTER ( ALLSELECTED ( Table ), YEAR ( Table[Date] ) = YEAR ( currdate ) && WEEKNUM ( Table[Date] ) = WEEKNUM ( currDate, 1 )When I write the YEAR DAX I can't insert table date. Is it normal????
- Anonymous7 years ago
Hi filippoalicicco,
>>When I write the YEAR DAX I can't insert table date. Is it normal????
Can you please share more detail? BTW, my formula is a measure. Which connection mode you test, is it direct query?
Regards,
Xiaoxin Sheng
Hi filippoalicicco,
You can consider to use if statement with weekday function to get current date, then use it to filter and summary record.
Summary on Monday =
VAR currDate =
MAX ( Table[Date] )
RETURN
IF (
WEEKDAY ( currDate, 2 ) = 1,
CALCULATE (
SUM ( Table[Amount] ),
FILTER (
ALLSELECTED ( Table ),
YEAR ( Table[Date] ) = YEAR ( currdate )
&& WEEKNUM ( Table[Date] ) = WEEKNUM ( currDate, 1 )
)
),
SUM ( Table[Amount] )
)
Regards,
Xiaoxin Sheng
- filippoalicicco7 years agoFrequent Visitor
Hi and thank you for your answer!!
I have a problem with this peace of DAX:
FILTER ( ALLSELECTED ( Table ), YEAR ( Table[Date] ) = YEAR ( currdate ) && WEEKNUM ( Table[Date] ) = WEEKNUM ( currDate, 1 )When I write the YEAR DAX I can't insert table date. Is it normal????
- Anonymous7 years agoNot applicable
Hi filippoalicicco,
>>When I write the YEAR DAX I can't insert table date. Is it normal????
Can you please share more detail? BTW, my formula is a measure. Which connection mode you test, is it direct query?
Regards,
Xiaoxin Sheng
- StuBee5 years ago
Helper I
Hi Anonymous
Is it possible to do this as a column?This is almost exactly what I have been hunting for, but I want to be able to look at this as a trend.