Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I have two tables:
Simple visualization:
Table_1 and Table_2 are related, many-to-many via a bridging table (distinct on ID). I can't seem to find the right set of functions to get me the value I want. Any help greatly appreciated!
Thanks in advance.
Solved! Go to Solution.
Hey,
I'm using the following DAX statement to create a calculated column in Table_2, maybe this is already sufficient and it's not necessary to create a Table_3:
Last Revision Number = var thisID = 'Table_2'[ID] var thisDate = 'Table_2'[Date] return MAXX( TOPN( 1 ,FILTER( ALL('Table_1') ,'Table_1'[ID] = thisID && 'Table_1'[Changed_Date] <= thisDate ) ,'Table_1'[Changed_Date] ,DESC ) ,[Revision Number] )
Please be aware that I'm using <= instead of just < because there is no revision number before 2018-11-01.
Regards,
Tom
Hi @Aidan,
By my tests, the solution of TomMartens should be helpful.
If you have solved your problem, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
If you still need help, please feel free to ask.
Best Regards,
Cherry
Hey,
I'm using the following DAX statement to create a calculated column in Table_2, maybe this is already sufficient and it's not necessary to create a Table_3:
Last Revision Number = var thisID = 'Table_2'[ID] var thisDate = 'Table_2'[Date] return MAXX( TOPN( 1 ,FILTER( ALL('Table_1') ,'Table_1'[ID] = thisID && 'Table_1'[Changed_Date] <= thisDate ) ,'Table_1'[Changed_Date] ,DESC ) ,[Revision Number] )
Please be aware that I'm using <= instead of just < because there is no revision number before 2018-11-01.
Regards,
Tom
That's brilliant. Thanks very much!
User | Count |
---|---|
64 | |
59 | |
47 | |
32 | |
31 |
User | Count |
---|---|
84 | |
73 | |
52 | |
50 | |
44 |