Forum Discussion
DharmaChinta
7 years agoFrequent Visitor
Table visual to show only current week Data By default without any filter
Hi Team, Is there a way to show only One week Data By default without any filter on a table visual and based on the week selection change accordingly ? May be a DAX that just filter on the curren...
MFelix
Super User
7 years agoHi DharmaChinta,
Try to create a measure like this
Measure =
CALCULATE (
SUM ( Table[Column] );
FILTER (
ALL ( Table[DateColumn] );
WEEKNUM ( Table[DateColumn] ) = WEEKNUM ( TODAY () )
)
)
Regards,
MFelix
Try to create a measure like this
Measure =
CALCULATE (
SUM ( Table[Column] );
FILTER (
ALL ( Table[DateColumn] );
WEEKNUM ( Table[DateColumn] ) = WEEKNUM ( TODAY () )
)
)
Regards,
MFelix
Anonymous
5 years agoNot applicable
Is this also possible for the current week and the current year? I have multiple years.
- MFelix5 years ago
Super User
Hi Anonymous
You need to add the year to the filter part of the measure:
Measure = CALCULATE ( SUM ( Table[Column] ); FILTER ( ALL ( Table[DateColumn] ); WEEKNUM ( Table[DateColumn] ) = WEEKNUM ( TODAY () ) && YEAR ( Table[DateColumn] ) = YEAR ( TODAY () ) ) )