Forum Discussion

faheem_Latif_BI's avatar
3 years ago
Solved

dynamic LIST of values in MCODE

Hi GURUS,

hope you are doing good !

This is my MCODE which is working fine.

 

Sql.Database(DataSource, Database, [Query=" 
    SELECT * FROM [GroupFinance].[Voyager Intercompany Journal Data] 
    where [Entity Code] = '"&PropertyCode&"' 
    AND [Post Date] >='"&Fromdate&"' and [Post Date] <= '"&Todate&"'   "])

 

Now i want to add list of values in [Entity Code] using PropertyCode parameter.  

please help 

thanks in advance 

  • You can use:

    where [Entity Code] IN ('"&Text.Combine(PropertyCode, "', '")&"')