Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Extension of a previous DAX Query

Hi Guys,  This is an extension of the query listed here : https://community.fabric.microsoft.com/t5/DAX-Commands-and-Tips/How-Can-I-use-DAX-to-achieve-my-desired-goal-below-Pulling-a/m-p/3396761#M1...
  • johnt75's avatar
    3 years ago

    I think you can use

    New table =
    SELECTCOLUMNS(
    	GENERATE(
    		SELECTCOLUMNS(
    			'Table1',
    			"Tower ID", 'Table1'[Tower ID],
    			"MaxHeight", 'Table1'[Height]
    		),
    		VAR MaxHeight = [MaxHeight]
    		RETURN
    			CALCULATETABLE(
    				SELECTCOLUMNS(
    					'Table2',
    					"height", 'Table2'[height],
    					"SRF", 'Table2'[SRF]
    				),
    				'Table2'[height] <= MaxHeight
    			)
    	),
    	"Tower ID", [Tower ID],
    	"Height", [height],
    	"SRF", [SRF]
    )