Forum Discussion
clemente
Mar 25, 2025Copper Contributor
Using DAX or Power BI to select rows according to specific rules
Hi everybody,
I have an Excel table showing stock values at different dates like this:
WKN | ID | Date | Threshold | Coupon Payment |
LB3MZU | 00001 | 17-mai-2024 | € 5,60 | € 66,00 |
LB3MZU | 00002 | 16-mai-2025 | € 5,60 | € 66,00 |
LB3MZU | 00003 | 15-mai-2026 | € 5,60 | € 66,00 |
LB3MZU | 00004 | 21-mai-2027 | € 5,60 | € 66,00 |
LB3MZU | 00005 | 19-mai-2028 | € 5,60 | € 66,00 |
LB3MZU | 00006 | 18-mai-2029 | € 5,60 | € 66,00 |
DDZ0TQ | 00007 | 30-nov-2023 | € 39,95 | € 30,00 |
DDZ0TQ | 00008 | 02-dez-2024 | € 39,95 | € 30,00 |
DDZ0TQ | 00009 | 01-dez-2025 | € 39,95 | € 30,00 |
DDZ0TQ | 00010 | 30-nov-2026 | € 39,95 | € 30,00 |
DDZ0TQ | 00011 | 30-nov-2027 | € 39,95 | € 30,00 |
DDZ0TQ | 00012 | 30-nov-2028 | € 39,95 | € 30,00 |
DW7H49 | 00013 | 10-jul-2024 | € 115,50 | € 35,00 |
DW7H49 | 00014 | 10-jul-2025 | € 115,50 | € 35,00 |
DW7H49 | 00015 | 10-jul-2026 | € 115,50 | € 35,00 |
DW7H49 | 00016 | 12-jul-2027 | € 115,50 | € 35,00 |
DW7H49 | 00017 | 10-jul-2028 | € 115,50 | € 35,00 |
DW7H49 | 00018 | 10-jul-2029 | € 115,50 | € 35,00 |
Is there a way using DAX or Power Query to select rows of unique WKNs (Column A) showing the only the most distant date (or the biggest ID)? The result I would like to achieve is:
WKN | ID | Date | Threshold | Coupon Payment |
LB3MZU | 00006 | 18-mai-2029 | € 5,60 | € 66,00 |
DDZ0TQ | 00012 | 30-nov-2028 | € 39,95 | € 30,00 |
DW7H49 | 00018 | 10-jul-2029 | € 115,50 | € 35,00 |
Thank you in advance!
- OliverScheurichGold Contributor