Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (11.1k points)

I had a query and filter on the column for another table

let
    Source = Salesforce.Data("https://login.salesforce.com/", [CreateNavigationProperties=true]),
    MyCustomObject = Source{[Name="MyCustomObject "]}[Data],
    accnt = Source{[Name="Account"]}[Data],
    accntId = Table.SelectColumns(accnt, {"Id"}),
    accntList = Table.ToList(accntId, Combiner.CombineTextByDelimiter(",")),
    #"Filtered" =  Table.SelectRows(MyCustomObject, each List.Contains(accntList, [AccountId__c]))

 in 
    #"Filtered"

How can I do this? 

3 Answers

0 votes
by (22.5k points)
edited by

Transform this particular line:

accntList = List.Distinct(accnt[Id]),

code will look like this:

let
    Source = Salesforce.Data("https://login.salesforce.com/", [CreateNavigationProperties=true]),
    MyCustomObject = Source{[Name="MyCustomObject "]}[Data],
    accnt = Source{[Name="Account"]}[Data],
    accntList = List.Distinct(accnt[Id]),
    #"Filtered" =  Table.SelectRows(MyCustomObject, each List.Contains(accntList, [AccountId__c]))

 in  

    #"Filtered" 

If u want to learn the tool in depth, then come to us and sign up for this Power BI course online at Intellipaat.

0 votes
by
buying real viagra online <a href="http://llviabest.com/#">viagra. no prescription</a> buy viagra in sydney [url=http://llviabest.com/]viagra sale[/url] ’
0 votes
by
viagra online by paypal <a href="http://genqpviag.com/#">viagra professional scam</a> viagra us overnight mastercard accepted [url=http://genqpviag.com/]viagra gold bestellen[/url] ’

Related questions

0 votes
1 answer
0 votes
1 answer
asked Mar 28, 2021 in BI by Chris (11.1k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...