Forum Discussion
luciancostin
7 years agoRegular Visitor
Self-join table dynamically
Hi Community, Can i dynamically join a table with itself dynamically? e.g. for all the distinct values of one column, join the table with itself on a few other columns? Or , otherwise, how ca...
Greg_Deckler
7 years agoCommunity Champion
Sure, you would just create a custom column and use EARLIER. Here is a blog article on EARLIER. See my article on Mean Time Before Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/339586
luciancostin
7 years agoRegular Visitor
Thank you, Greg,
Here is what i ended up with, to get a single other row computation:
computed = sumx(filter('table';and(and(and('table'[product]=earlier('table'[product]);'table'[kpi]=1);'table'[state]=earlier('table'[state]));'table'[month]=earlier('table'[month]))); 'table'[value]) * sumx(filter('table';and(and(and('table'[product]=earlier('table'[product]);'table'[kpi]=3);'table'[state]=earlier('table'[state]));'table'[month]=earlier('table'[month]))); 'table'[value])Is this the way you would have seen it too? i find it quite complex, to be honest, is there any other easier, more straightforward way?