Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
Hi All
I have a list of patients and their various blood test results. Below is dummy data to futher explain what I need to evaluate.
Name | Measure Type | Date Taken | Result | Measure Confilcts |
Jason Moor | HbA1c | 2018/06/13 | 10.3 | Proximity Conflict |
Jason Moor | HbA1c | 2018/05/13 | 10.1 | Proximity Conflict |
Jason Moor | HbA1c | 2019/10/13 | 7.6 | |
David Mason | HbA1c | 2017/11/03 | 6.9 | Proximity Conflict |
David Mason | HbA1c | 2019/12/01 | 6.6 | |
David Mason | HbA1c | 2017/10/03 | 8.6 | Proximity Conflict |
I need a dax function that will evaluate HbA1c results for a patient and flag any results that were taken within 2 months of each other as Proximity Conflict.
In the table above, Jason Moor has 3 results, 2 of which are taken within a month of each other. I need to flag both of them as Proximity Conflicts because of this.
I tried using the below calculated column:
@Anonymous Please try below measure
Measure 2 =
VAR _date = MAX('Table'[Date Taken])
VAR _previousDate = CALCULATE(MAX('Table'[Date Taken]),FILTER(ALLEXCEPT('Table','Table'[Name]),'Table'[Date Taken]<_date && 'Table'[Measure Type]= "HbA1c"))
VAR _nextdate = CALCULATE(MIN('Table'[Date Taken]),FILTER(ALLEXCEPT('Table','Table'[Name]),'Table'[Date Taken]>_date && 'Table'[Measure Type]= "HbA1c"))
RETURN IF(DATEDIFF(_date,_nextdate,MONTH)=1||DATEDIFF(_previousDate,_date,MONTH)=1,"Proximity Conflict")
@Anonymous thank you for taking the time to help. I tried your solution but I could not get it to work on my report. I even tried using it on a separate power bi report but it just would not load any results, it reqiures a lot of memory and would end up timing out. I cant even tell you if it works or not because it does not being back any results. I use a 8th Gen i7 8GB ram laptop and it would not load results. Intead it gives me this Error Message:
"There's not enough memory to complete this operation. Please try again later when there may be more memory available."
Any way I can troubleshoot this performance issue?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
14 | |
10 | |
10 | |
9 | |
9 |
User | Count |
---|---|
20 | |
13 | |
12 | |
11 | |
8 |