Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I'm building out a Dashboard to carry out analysis on Backtest results from Algo trading. For the most part it's going well, but I'm stuck on 1 aspect at the moment.
I have the following date where:
Date is from a date table
Balance is from the raw data
Peak is calculated via a standard Dax shown under the table
Concurrency is where I'm stuck, I want to count the number of days the peak stays the same so I can calc the amount of days between peaks.
Any advice would be appreciated. Thanks Chris
| Date | Balance | Peak | Concurrency |
| 01/01/2022 | 1000 | 1000 | 1 |
| 02/01/2022 | 1005 | 1005 | 1 |
| 02/01/2022 | 900 | 1005 | 2 |
| 02/01/2022 | 950 | 1005 | 3 |
| 02/01/2022 | 1100 | 1100 | 1 |
Peak Strat = MAXX(FILTER(ALLSELECTED('FX Export Primary'), 'FX Export Primary'[Trade UID] <=MAX('FX Export Primary'[Trade UID])),'FX Export Primary'[Equity])
Solved! Go to Solution.
H @ThornTech,
I'd like to suggest you extract the current date from the calendar table and use it and user id as conditions to filter table records and get corresponding results:
Peak Strat =
VAR currDate =
MAX ( Calendar[Date] )
RETURN
CALCULATE (
MAX ( 'FX Export Primary'[Equity] ),
FILTER (
ALLSELECTED ( 'FX Export Primary' ),
'FX Export Primary'[Date] <= currDate
),
VALUES ( 'FX Export Primary'[UID] )
)
If these also don't help, please share some dummy data or pbix file with expected results to help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
H @ThornTech,
I'd like to suggest you extract the current date from the calendar table and use it and user id as conditions to filter table records and get corresponding results:
Peak Strat =
VAR currDate =
MAX ( Calendar[Date] )
RETURN
CALCULATE (
MAX ( 'FX Export Primary'[Equity] ),
FILTER (
ALLSELECTED ( 'FX Export Primary' ),
'FX Export Primary'[Date] <= currDate
),
VALUES ( 'FX Export Primary'[UID] )
)
If these also don't help, please share some dummy data or pbix file with expected results to help us clarify your scenario and test to coding formula.
How to Get Your Question Answered Quickly
Regards,
Xiaoxin Sheng
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 6 | |
| 6 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 21 | |
| 10 | |
| 8 | |
| 8 |