Forum Discussion
BTI_Afuentes
6 years agoHelper I
Select data based on range values from a realated table
Hi everybody. I have a summarized table where it is calculated a Score for a project. This table is related to a 'Scale' table where I have several ranges for identify the grade based on the scor...
- 6 years ago
BTI_Afuentes - This same basic problem has been cropping up in the forums of late so I posted this solution to the Quick Measures gallery. It includes a PBIX of the solution:
https://community.powerbi.com/t5/Quick-Measures-Gallery/LOOKUPVALUE-Range/m-p/974201#M430
Greg_Deckler
6 years agoCommunity Champion
Perhaps:
Scale Result Column =
VAR __Score = 'Project'[Score]
VAR __ID = 'Project'[ScaleID]
VAR __Scale =
MAXX(
FILTER(
'Scales',
'Scales'[ScaleID] = __ID &&
'Scales'[From] <= __Score &&
'Scales'[To] >= __Score
),
[Scale Result]
)
RETURN
__Scale
- Greg_Deckler6 years agoCommunity Champion
BTI_Afuentes - This same basic problem has been cropping up in the forums of late so I posted this solution to the Quick Measures gallery. It includes a PBIX of the solution:
https://community.powerbi.com/t5/Quick-Measures-Gallery/LOOKUPVALUE-Range/m-p/974201#M430
- BTI_Afuentes6 years agoHelper I
Thank you very much Gerg!
It worked when I used the DAX from the solution on the Quick Measures gallery.
Regards,
Angel