Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply

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 

1 ACCEPTED SOLUTION
artemus
Employee
Employee

You can use:

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

View solution in original post

2 REPLIES 2
artemus
Employee
Employee

You can use:

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

Hi @faheem_Latif_BI ,

I don't understand your request.

Please read the guidelines on how to post your questions to get them answered quickly and correctly:help how to get your questions answered quickly - Microsoft Power BI Community 

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

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors