Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have 5 queries from Excel source, and 5 similar queries from Dataflow Source.
Now I want to easily choose whether I want to use the Excel / Dataflow source.
Both query names only differ in their name (it starts with Excel or DF).
Therefore I created a Parameter with just 2 values: Excel or DF
Now I create a new query that uses that parameter (see the fact Population example below).
The result is just a text DF fact population.
What I want is to see this table itself, and when I change the parameter to Excel that I then see the Excel table itself here.
In the query fact Population I now use this M:
let
Source = Sourcetype&" fact Population"
in
Source
Solved! Go to Solution.
@FilipFireFlyBI , Add both of these using the required code as table
Source = <Code to take data from excel>
Source2 = < Code to take data from DF>
Source3 = if parameter ="excel" then Source else Source2
Thanks for the easy solution!
Here the M code:
let
SourceExcel = #"Excel fact Population",
SourceDF = #"DF fact Population",
Source= if SourcetypeParameter = "DF" then SourceDF else SourceExcel
in
Source
@FilipFireFlyBI , Add both of these using the required code as table
Source = <Code to take data from excel>
Source2 = < Code to take data from DF>
Source3 = if parameter ="excel" then Source else Source2
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.