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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

Create conditional table (SWITCH or IF functions not working)

Hello community,

 

i guess, I am trying to do something quite simple, but somehow DAX is not allowing to have a conditional expression in the definition of my new tabel ("Table =").

Laydner_0-1643277949893.png

In the code above, the green command does not work (nor does it with the IF function) but the blue code works normally.

Can anyone help me there? Thanks

3 REPLIES 3
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

A calculated table cannot be dynamic according to users' interaction with slicers and filters in the report. It is only evaluated and populated when it's created or the whole data model is refreshed. 

 

I guess your purpose is to filter the second slicer (Selector of Partner) with the selected value in the first slicer (Selector of Feature). You can generate a table in below structure. Features are in one column and their related Partners are in the other column. Then you can put Feature column in the first slicer and put Partner column in the other slicer. In this way, the second slicer can be filtered. 

vjingzhang_0-1643780078157.png

 

Hope it helps.

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

amitchandak
Super User
Super User

@Anonymous , I doubt you can switch tables,  Also you can not use measure in new table creation, it will not work correctly

 

you can move code if inside the distinct and try 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hello @amitchandak , sadly it didnt work.

What I am trying to do with this dynamic table, is to have a dynamic selector. I want to be able to change the column in my visual "Selector of Partner" in accordance with what my "Selector of Feature" selects.

Laydner_0-1643292051365.png

Any ideas?




Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.