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.
Hello,
To simplify my problem, let's pretend that I am using accounts data. Each account has a type : A, B or C. I am using a parameter which filters my data according to these three types. To do so, I am filtering the tables with this parameter in the Query section.
What I would like to do is to add a "none" option to the parameter to get all the data without any filter and therefore be able to display the global data.
Best
Solved! Go to Solution.
Hi @Anonymous
Sure, you can use the exaple below.
Parameter query.
"none" meta [IsParameterQuery=true, List={"none", "A", "B", "C"}, DefaultValue="none", Type="Text", IsParameterQueryRequired=true]
Table query
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclSK1YlWcgKTzkqxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [types = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"types", type text}}), #"Filtered Rows" = if Parameter = "none" then #"Changed Type" else Table.SelectRows(#"Changed Type", each [types] = Parameter ) in #"Filtered Rows"
Hope this helps!
Hi @Anonymous
Sure, you can use the exaple below.
Parameter query.
"none" meta [IsParameterQuery=true, List={"none", "A", "B", "C"}, DefaultValue="none", Type="Text", IsParameterQueryRequired=true]
Table query
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WclSK1YlWcgKTzkqxsQA=", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [types = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"types", type text}}), #"Filtered Rows" = if Parameter = "none" then #"Changed Type" else Table.SelectRows(#"Changed Type", each [types] = Parameter ) in #"Filtered Rows"
Hope this helps!
Hi @Mariusz I am also interested in the solution. What do I have to modify in my query to have a none option?
I dint have a list like in your example.
Thanks Giora
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
106 | |
98 | |
75 | |
63 | |
62 |
User | Count |
---|---|
135 | |
105 | |
104 | |
80 | |
65 |