Forum Discussion
Saxon10
2 years agoPost Prodigy
Index Aggregate Row Max Number
I have two tables named "Data" and "Report." Within the Data table, there are columns such as Area Code, Type, Rack Length, Rack Width, Rack Height, and Volume, which is determined based on the rack...
Anonymous
2 years agoNot applicable
I had a quick look;
I got the above with:
Type =
VAR CurrentAreaCode = 'Report'[Area Code]
VAR CurrentPackLength = 'Report'[Pack Length]
VAR CurrentPackWidth = 'Report'[Pack Width]
VAR CurrentPackHeight = 'Report'[Pack Height]
VAR PossibleRacks =
FILTER(
'Data',
'Data'[Area Code] = CurrentAreaCode &&
'Data'[Rack Length] >= CurrentPackLength &&
'Data'[Rack Width] >= CurrentPackWidth &&
'Data'[Rack Height] >= CurrentPackHeight
)
VAR MinVolumeRack =
MINX(
PossibleRacks,
'Data'[Volume]
)
RETURN
IF(
ISBLANK(MinVolumeRack),
"NA",
CALCULATE(
VALUES('Data'[Type]),
'Data'[Volume] = MinVolumeRack
)
)
Which I think is on the right track, but there needs to be some adjustments somewhere perhaps, as there are significantly more no-matches than matches. I can try to take another look tomorrow if it helps, or perhaps the above will be a good starting point for you
Saxon10
2 years agoPost Prodigy
Anonymous , Thank you for your swift response. I look forward to your additional feedback and a solution for the unmatched rows.