Forum Discussion
mysasai
5 years agoFrequent Visitor
Filter a table (visual) with three or six months gap based on another date slicer filter
I have a data with month end dates like table below. I need two filters, one is a regular slicer with date column in it. and other filter that contains 3 Months, 6 Months as options to select. ...
- 5 years ago
Hi mysasai ,
Try this:
Measure = VAR SelectedMonthInterval_ = SELECTEDVALUE ( 'Month Interval'[Month Interval] ) VAR Rank_ = RANKX ( ALLSELECTED ( 'Table' ), CALCULATE ( MAX ( 'Table'[Date] ) ), , DESC, DENSE ) VAR Mod_ = MOD ( Rank_, SelectedMonthInterval_ ) RETURN IF ( Mod_ = 1, 1 )Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Icey
Community Support
5 years agoHi mysasai ,
Try this:
Measure =
VAR SelectedMonthInterval_ =
SELECTEDVALUE ( 'Month Interval'[Month Interval] )
VAR Rank_ =
RANKX (
ALLSELECTED ( 'Table' ),
CALCULATE ( MAX ( 'Table'[Date] ) ),
,
DESC,
DENSE
)
VAR Mod_ =
MOD ( Rank_, SelectedMonthInterval_ )
RETURN
IF ( Mod_ = 1, 1 )
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.