Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
I have a table with millions of records where I'm trying to dynamically arrive at the max [Age] by [As of Date], but filtered to only where the [Running Total] is less than 80% of the [Date Total]. So in this example, the result is 35. My visual will list 12 dates with the max age just before the 80% threshold is reached within the current filter context. If the user filters on [Acct #], the result will update based on the current context. I've been able to get a version of a measure to work, but it takes 1+ mins to run.
| Measure | Measure | Measure | ||||
| As of Date | Acct # | Age | Amt | Running Total | Date Total | Running Total % |
| 11/1/2020 | 123 | 0 | $5,486.00 | $5,486.00 | $25,941.00 | 21.15% |
| 11/1/2020 | 123 | 15 | $8,648.00 | $14,134.00 | $25,941.00 | 54.49% |
| 11/1/2020 | 123 | 21 | $748.00 | $14,882.00 | $25,941.00 | 57.37% |
| 11/1/2020 | 123 | 35 | $3,314.00 | $18,196.00 | $25,941.00 | 70.14% |
| 11/1/2020 | 123 | 40 | $7,745.00 | $25,941.00 | $25,941.00 | 100.00% |
Hi, @ChuckChuck
Maybe you can take a try to store the temporary table in a var variable ,
Max Age <80% Threshold =
VAR tab =
FILTER (
SUMMARIZE (
'Table',
'Table'[As of Date],
'Table'[Age],
"RT %", [Running Total %]
),
[Running Total %] < .8
)
RETURN
MAXX ( tab, 'Table'[Age] )
or change the temporary table to a calculated table before you need to call the table in the measure( although this will take up some storage )
Best Regards,
Community Support Team _ Eason
Thank you, @v-easonf-msft! Unfortunately, this solution doesn't produce an improved result. My existing measure takes ~2.43 minutes to run, while your suggestion takes ~2.42 minutes to run. The second suggestion to have a table with the stored values won't work because users will need to apply filters from the filter pane and see the max aged days update accordingly, so I need something dynamic against the full table in the current filter context.
@ChuckChuck can you share what existing measure you are using? Also if possible share sample pbix file to look into it.
Check my latest blog post Year-2020, Pandemic, Power BI and Beyond to get a summary of my favourite Power BI feature releases in 2020
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos to whoever helped to solve your problem. It is a token of appreciation!
⚡Visit us at https://perytus.com, your one-stop-shop for Power BI-related projects/training/consultancy.⚡
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Hello @parry2k ,
PBIX: https://1drv.ms/u/s!AqaBEhuP2H_olAOBkyTxlctZXCWa?e=ONJJxS
Measure:
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 38 | |
| 38 | |
| 28 | |
| 27 |
| User | Count |
|---|---|
| 124 | |
| 88 | |
| 73 | |
| 66 | |
| 65 |