Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Solved! Go to Solution.
@willit6182 Not 100% sure I understand this. Sample data would help but perhaps something like this:
Column =
VAR __ID = [EncounterID]
VAR __Codes = SELECTCOLUMNS( FILTER( 'Table 3', [EncounterID] = __ID ), [Procedure Code] )
VAR __MaxRVU = MAXX( FILTER( 'Table 2', [Procedure Code] IN __Codes ), [RVU] )
VAR __Result = MAXX( FILTER( 'Table 2', [Procedure Code] IN __Codes && [RVU] = __RVU ), [Procedure Description (groups) )
RETURN
__Result
@willit6182 Not 100% sure I understand this. Sample data would help but perhaps something like this:
Column =
VAR __ID = [EncounterID]
VAR __Codes = SELECTCOLUMNS( FILTER( 'Table 3', [EncounterID] = __ID ), [Procedure Code] )
VAR __MaxRVU = MAXX( FILTER( 'Table 2', [Procedure Code] IN __Codes ), [RVU] )
VAR __Result = MAXX( FILTER( 'Table 2', [Procedure Code] IN __Codes && [RVU] = __RVU ), [Procedure Description (groups) )
RETURN
__Result
Thanks but I'm still not quite getting it to work.
To simply the dataset, I now have one larger table as below. This has multiple instances of the Encounter ID, each with a distinct Procedure Code.
EncounterID | Procedure Code | RVU Value |
102247204 | 20225 | 2.45 |
102247204 | 7701226 | 1.5 |
104241596 | 38222 | 1.44 |
104241596 | 99152 | 0.25 |
104241596 | 7701226 | 1.5 |
110248074 | 36590 | 3.1 |
110248074 | 99152 | 0.25 |
110248074 | 7700126 | 0.38 |
123243462 | 7660426 | 0.59 |
129245185 | 32555 | 2.27 |
1012415987 | 32555 | 2.27 |
1022429872 | 49406 | 4 |
1022429872 | 99152 | 0.25 |
1022445014 | 50706 | 3.8 |
1022445014 | 99152 | 0.25 |
1022445014 | 50431 | 1.1 |
1022445014 | 50389 | 1.1 |
I also have a second KEY table that lists every possible Procedure Code only once, with a corresponding Category as below.
Procedure Code | Category |
10005 | Minors |
10006 | Minors |
10030 | Visceral Tubes |
20206 | Biopsy |
20220 | Biopsy |
20225 | Biopsy |
20501 | Fluoro |
20552 | Fluoro |
22510 | Kyphoplasty |
22513 | Kyphoplasty |
22514 | Kyphoplasty |
22515 | Kyphoplasty |
32408 | Biopsy |
32550 | Visceral Tubes |
36010 | Catheter, Angio, Guidance, Sedation |
36012 | Catheter, Angio, Guidance, Sedation |
I am trying to create a measure that classifies each Distinct Encounter ID by the Category of the Procedure Code with the largest RVU value. In the first table above, the highest RVU value procedure code from each Encounter ID is highlighted in Red. So basically I need that Encounter ID to be classified as the Category on the second table linked to the Procedure code in Red.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
20 | |
7 | |
6 | |
5 | |
5 |
User | Count |
---|---|
24 | |
10 | |
10 | |
9 | |
6 |