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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
SjoerdV
Frequent Visitor

How to select dataflow based on variable?

Hi all,

 

I'm developing a model that get's it input via Dataflows. However, since we want to look at numbers as they were on a cut-off date and with the latest figures available, I'm trying to switch between Dataflows via a parameter. This is where I'm affraid I need a bit of help.

 

So I've got 2 Dataflows (A and B) that are added in Power Query, I also have a parameter with text-values A or B.

 

To start, I reference in my fact_query the source-step as follows; = Table.SelectColumns(A,{"colums"}). As A is the table to reference, I tried various options of "&parameter&". This works, but it would only see a single-column that consists of A. So how can I tell Power Query I expect it to look into Dataflow A?

 

Can you guys help me with what I'm missing here?

 

Many thanks in advance.

 

Sjoerd

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @SjoerdV 

This article should be useful.

https://data-marc.com/2019/04/16/pimp-the-dataflows-connector-in-power-bi/

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi 

Is this problem sloved? 
If it is sloved, could you kindly accept it as a solution to close this case?
If not, please let me know.
 
Best Regards
Maggie

Many thanks @v-juanli-msft !

 

In the end I created 2 versions of each dataflow (already had that of course), one named A LIVE and the other one A CUTOFF. Then I created a text-parameter with 2 options, LIVE and CUTOFF. After that it was simpy a matter of selecting the workspace the dataflows reside in, filtering on all dataflows that contain "A" and then filter on dataflows names that end on the parameter-value. From there on simply expanding etc etc.

 

In the end I think I was in the right direction, only wrong with the coding.

Nevertheless, thanks again!

 

v-juanli-msft
Community Support
Community Support

Hi @SjoerdV 

As tested, it works on my side.

I can edit parameters to change my dataflow in Power BI Desktop.

Capture17.JPG

 

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-juanli-msft
Community Support
Community Support

Hi @SjoerdV 

This article should be useful.

https://data-marc.com/2019/04/16/pimp-the-dataflows-connector-in-power-bi/

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Kudoed Authors