Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
In my main table [FilterListZC] I have a column [FilterZC] which contains nested lists, and a column [Selected] of nested tables. Each nested table in [Selected] contains a column [TenorCode] I would like to filter with the values in the corresponding list in [FilterZC].
I have tried various solutions but none work. Here is an example of one that does not work:
= Table.AddColumn(FilterListZC, "FilteredZC", each Table.SelectRows([Selected], each List.Contains( (r)=> [FilterZC], [TenorCode])))
Is this possible? What do I need to change?
Thanks a million for any help!
Solved! Go to Solution.
Hi @MichaelHalling ,
you can try the following, otherwise please provide sample data:
Table.AddColumn(FilterListZC, "FilteredZC", each Table.SelectRows([Selected], (r) => List.Contains( FilterZC], r[TenorCode])))
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
Hi @MichaelHalling ,
The best person to help you with this is @ImkeF the best M language user in the community.
@ImkeF can you please check this question.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsHi @MichaelHalling ,
you can try the following, otherwise please provide sample data:
Table.AddColumn(FilterListZC, "FilteredZC", each Table.SelectRows([Selected], (r) => List.Contains( FilterZC], r[TenorCode])))
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
@ImkeFYou are amazing! That worked! Don't really know what r[TenorCode] does but it solved my problem. Also gotten a few helpful tips from your blog before this so a big THANK YOU for all your work. @MFelix Thanks for caring 🙂
PS. You missed a '[ ' in [FilterZC] so for anyone reading this, this is the exact code that solved my problem.
Table.AddColumn(FilterListZC, "FilteredZC", each Table.SelectRows([Selected], (r) => List.Contains( [FilterZC], r[TenorCode])))
Hi @MichaelHalling ,
very pleased to hear 🙂
And thanks for the correct code, I did mine on top of my head.
With regards to r[Tenor]: There is a bit of syntax sugar in the M-language that obfuscates what's really going on:
- https://docs.microsoft.com/en-us/powerquery-m/understanding-power-query-m-functions
Imke Feldmann (The BIccountant)
If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!
How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.
| User | Count |
|---|---|
| 48 | |
| 46 | |
| 41 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 70 | |
| 67 | |
| 32 | |
| 27 | |
| 26 |