Forum Discussion
formula
- 10 months ago
Hi Julier,
Try below DAX:-
Vol_Match =
CALCULATE(
MAX(Table[Vol]),
Table[ID] = "BEL_14667/0",
Table[forecast A] = Table[forecast b],
Table[forecast b] = DATE(2025,8,1)
)๐ I hope this solution helps you unlock your Power BI potential! If you found it helpful, click 'Mark as Solution' to guide others toward the answers they need.
๐ก Love the effort? Drop the kudos! Your appreciation fuels community spirit and innovation.
๐ As a proud SuperUser and Microsoft Partner, weโre here to empower your data journey and the Power BI Community at large.
๐ Curious to explore more? [Discover here].
Letโs keep building smarter solutions together! - 10 months ago
Hello !
Thank you for posting on Fabric community.
You can filter the table to just the rows where ID = BEL_14667/0 and forecastA = forecastB = #date(2025,8,1)
and from that filtered table, take the first match vol value if no row matches return null.= let Source = #table( type table [ID = text, forecastA = date, forecastB = date, Vol = number], { {"BEL_14667/0", #date(2025, 7, 1), #date(2025, 7, 1), 232932}, {"BEL_14667/0", #date(2025, 7, 1), #date(2025, 8, 1), 195613}, {"BEL_14667/0", #date(2025, 7, 1), #date(2025, 9, 1), 239887}, {"BEL_14667/0", #date(2025,10, 1), #date(2025,10, 1), 294476}, {"BEL_14667/0", #date(2025,11, 1), #date(2025,11, 1), 327610}, {"BEL_14667/0", #date(2025,12, 1), #date(2025,12, 1), 149035}, {"BEL_14667/0", #date(2025, 8, 1), #date(2025, 8, 1), 220000}, {"BEL_14667/0", #date(2025, 8, 1), #date(2025, 9, 1), 239887}, {"BEL_14667/0", #date(2025, 8, 1), #date(2025,10, 1), 294476} } ), TargetID = "BEL_14667/0", TargetDate = #date(2025, 8, 1), Filtered = Table.SelectRows( Source, each [ID] = TargetID and [forecastA] = TargetDate and [forecastB] = TargetDate ), ResultVol = if Table.IsEmpty(Filtered) then null else Filtered{0}[Vol] in ResultVolyou can find the solution in the pbix file.
Hello !
Thank you for posting on Fabric community.
You can filter the table to just the rows where ID = BEL_14667/0 and forecastA = forecastB = #date(2025,8,1)
and from that filtered table, take the first match vol value if no row matches return null.
= let
Source =
#table(
type table [ID = text, forecastA = date, forecastB = date, Vol = number],
{
{"BEL_14667/0", #date(2025, 7, 1), #date(2025, 7, 1), 232932},
{"BEL_14667/0", #date(2025, 7, 1), #date(2025, 8, 1), 195613},
{"BEL_14667/0", #date(2025, 7, 1), #date(2025, 9, 1), 239887},
{"BEL_14667/0", #date(2025,10, 1), #date(2025,10, 1), 294476},
{"BEL_14667/0", #date(2025,11, 1), #date(2025,11, 1), 327610},
{"BEL_14667/0", #date(2025,12, 1), #date(2025,12, 1), 149035},
{"BEL_14667/0", #date(2025, 8, 1), #date(2025, 8, 1), 220000},
{"BEL_14667/0", #date(2025, 8, 1), #date(2025, 9, 1), 239887},
{"BEL_14667/0", #date(2025, 8, 1), #date(2025,10, 1), 294476}
}
),
TargetID = "BEL_14667/0",
TargetDate = #date(2025, 8, 1),
Filtered = Table.SelectRows(
Source,
each [ID] = TargetID and [forecastA] = TargetDate and [forecastB] = TargetDate
),
ResultVol = if Table.IsEmpty(Filtered) then null else Filtered{0}[Vol]
in
ResultVol
you can find the solution in the pbix file.