Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Here is the code. The error I got is
Expression.Error: We cannot convert a value of type Record to type Text.
Details:
Value=[Record]
Type=[Type]
I am trying to create a dynamic query where i can use a filter in the PowerBI UI to determine what dates i am returning from snowflake. Thanks!
let
selectedDates = if Type.Is(Value.Type(DateMParameter), List.Type) then
Text.Combine({"'", Text.Combine(DateMParameter, "','") , "'"})
else
Text.Combine({"'" , DateMParameter , "'"}),
selectAllCountries = if Type.Is(Value.Type(DateMParameter), List.Type) then
List.Contains(DateMParameter, "__SelectAll__")
else
false,
query = "SELECT #(lf)*#(lf)#(lf)FROM LANDING.HIDDEN.POWERBIPROJECTSUMMARY",
dynamicFilter = if selectAllDates then " "
else Text.Combine({" WHERE Date in(", selectedDate, ")"}),
finalQuery = Text.Combine({query, dynamicFilter}),
Source = Value.NativeQuery(Snowflake.Databases("HIDDEN.southeast-asia.azure.snowflakecomputing.com","POWERBI_WH"){[Name="LANDING"]}[Data], [Query=finalQuery], null, [EnableFolding=true])
in
Source
Hi @GAPER,
The issue will probably be related with DateMParameter.. Can you provide it's query and/or results?
Best regards,
Jorge Pessoa
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
62 | |
61 | |
52 | |
39 | |
23 |
User | Count |
---|---|
85 | |
58 | |
45 | |
43 | |
38 |