Forum Discussion
Max Row Based on Insert Date
- 8 years ago
This calculated table gets close. It looks long, but it's not that complicated. I have attached a PBIX file
Table = VAR x = SELECTCOLUMNS( Table2 , "IDx",[ID] , "TASK" ,[TASK] , "DURATIONx" , INT(SUBSTITUTE('Table2'[DURATION]," HRS","")) , "INSERT DATE",[INSERT DATE] ) VAR y = GROUPBY( x, [IDx], "MAX_DURATIONx", MAXX(CURRENTGROUP(),[DURATIONx]) ) VAR z= SELECTCOLUMNS( GENERATEALL( 'Table1', FILTER( y, [ID] = [IDx] ) ), "IDz",[ID], "MAX_DURATOINx",[MAX_DURATIONx] ) RETURN SELECTCOLUMNS( GENERATEALL( z, FILTER( 'Table2',[ID] = [ID] && [MAX_DURATOINx] & " HRS" = 'Table2'[DURATION] ) ), "ID",[IDz], "TASK",[TASK], "DURATION",[DURATION], "INSERT DATE",[INSERT DATE] ) - Anonymous8 years ago
Yes there are many sites which explains how to do this. For example,Please refer the below URL which explains the left outer join in DAX.
https://curbal.com/blog/joining-table-in-power-bi-with-power-query-and-dax
Thanks
Raj
I See, for the last step are you suggesting to use the NATURALLEFTOUTERJOIN in Dax?
Yes there are many sites which explains how to do this. For example,Please refer the below URL which explains the left outer join in DAX.
https://curbal.com/blog/joining-table-in-power-bi-with-power-query-and-dax
Thanks
Raj
- nirvana_moksh8 years agoImpactful Individual
Thanks for the article Anonymous but the last step is something that I always have an issue with because of the PBI has joins in DAX and how it doesnt recognize the join columns and I was running into that again for some reason.