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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Wanted to create parameters based on json extracted column

Hi Team,

 

I have extracted a column ( emaildate ) from JSON in power bi desktop  and i have created 2 parameters based on that ( From Date and To Date ) now i wanted to link From date and To Date in Advance editor. Could you please help me with m language code here ? as i dont have column emaildate avaialble in main data source. so i cant use  this query (  Select * from maindatasource where emaildate >= from date and emaildate <= todate ) in advance editor 

 

Thanks,

Shubham

1 REPLY 1
dax
Community Support
Community Support

Hi @Anonymous , 

You could set parameter and use parameter to filter it. You need to create two parameter s in "edit queries" and set filter like below

697.PNG

698.PNG699.PNG

 

let
    Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMjIwMtA31DdUitWBckxROUbIHGOl2FgA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [date = _t]),
    #"Changed Type" = Table.TransformColumnTypes(Source,{{"date", type date}}),
    #"Filtered Rows" = Table.SelectRows(#"Changed Type", each [date] >= startp and [date] <= endt)
in
    #"Filtered Rows"

 

Best Regards,
Zoe Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.