Forum Discussion
EaglesTony
1 year agoPost Prodigy
How do I get a value from another table based on a date range
Hi, I have a table with multiple Date Ranges (table called "DateRanges"): Column1 Cycle CycleStartDate CycleEndDate 2 1 3/31/2022 4/13/2022 2 ...
- 1 year ago
Hello EaglesTony ,
Simple use Lookup between FinalTable and ReportTable to get the value :
Cycle =LOOKUPVALUE(FinalTable [Cycle], -- Column to returnFinalTable [Key], ReportTable [Key] -- Matching Key from both tables)I have checked this with sample data :I hope this is what you are looking for .
Did I solve your Query ? Please mark this as solution. Appreciate Kudos always
Cheers
EaglesTony
1 year agoPost Prodigy
I assume this is a measure on the ReportTable ?
divyed
1 year agoSuper User
Hello EaglesTony ,
No, this was adding column to 3rd table. To convert into measure please change as per below dax :
// Please change table names from T_2 to FinalTable and T_3 to ReportTable
MeasureValue =
CALCULATE(
MAX(T_2[Cycle]), -
T_2[Key] = SELECTEDVALUE(T_3[Key]) -- Matching the Key from T_2 and T_3
)
Cheers