Forum Discussion
GunnerJ
Post Patron
4 years agorepeat row value for new column based on filter date
I have a row counter for each row by account. What I'm hoping to do is repeat the max value across all rows as long as that rows date field is less than the date filter. The filter is in the "before"...
- 4 years ago
This works in your pbix file.
MAX ROW = VAR vMAXDATE = MAX('Date Table'[Date]) RETURN CALCULATE( CALCULATE( MAX('MASTER CHARGE ACTIONS'[ROWRANK]), FILTER('MASTER CHARGE ACTIONS', 'MASTER CHARGE ACTIONS'[CHG_DATE] <= vMAXDATE) ), ALLEXCEPT('MASTER CHARGE ACTIONS','MASTER CHARGE ACTIONS'[BI_ACCT]))
daniel79
Resolver II
4 years agoHi, can you try this?
MAX ROW = CALCULATE(
CALCULATE(
MAX('MASTER CHARGE ACTIONS'[ROWRANK]),
FILTER('MASTER CHARGE ACTIONS', 'MASTER CHARGE ACTIONS'[CHG_DATE] <= MAX('Date Table'[Date]))
),
ALLEXCEPT('MASTER CHARGE ACTIONS','MASTER CHARGE ACTIONS'[BI_ACCT]))GunnerJ
Post Patron
4 years agodaniel79 thanks for the reply!
our solution seems close but the value isn't updating as the date slider moves. It did get the max date across all rows though! In the picture below you can see the date slider only allows up to ROWRANK 9 which I'm hoping would take place of all of the 19s in MAX ROW. Any ideas on how to alter it to enable that functionality?
- daniel794 years ago
Resolver II
This works in your pbix file.
MAX ROW = VAR vMAXDATE = MAX('Date Table'[Date]) RETURN CALCULATE( CALCULATE( MAX('MASTER CHARGE ACTIONS'[ROWRANK]), FILTER('MASTER CHARGE ACTIONS', 'MASTER CHARGE ACTIONS'[CHG_DATE] <= vMAXDATE) ), ALLEXCEPT('MASTER CHARGE ACTIONS','MASTER CHARGE ACTIONS'[BI_ACCT]))- GunnerJ4 years ago
Post Patron
Thank you!