March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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" setting.
This is what I currently have but it's just repeating the rows current value. I've also tried the allexcept with just the account in the filter.
MAX ROW = CALCULATE(MAX('MASTER CHARGE ACTIONS'[ROWRANK]),ALLEXCEPT('MASTER CHARGE ACTIONS','MASTER CHARGE ACTIONS'[BI_ACCT],'MASTER CHARGE ACTIONS'[ROWRANK]), FILTER('MASTER CHARGE ACTIONS', 'MASTER CHARGE ACTIONS'[CHG_DATE] <= MAX('Date Table'[Date])))
For reference here's a snapshot of one account along with a picture of the slicer. The date table is joined on the CHG_DATE column. The hope is in this example if the date filter is greater than or equal to April 23rd, 2019 to have ALL rows for the account show maxRow of 19 (blue). If the date slicer was on or after April 5th, 2019 but less than the 23rd I'd want all MaxRows to show 11 and so on.
If anything else is needed please let me know and I'll be happy to provide more information.
Thanks in advance!
Solved! Go to Solution.
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]))
Hi,
Share the link from where i can download your PBI file.
Here you go! It's in the state shown in the last picture.
https://www.dropbox.com/s/fgrcl590zb21xoh/OZARKSGO%202.0.pbix?dl=0
Hi, 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]))
@daniel79 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?
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]))
Thank you!
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
133 | |
90 | |
88 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
70 | |
68 |