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

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.

EnterpriseDNA

SWITCH True Logic In Power BI - What's Possible With This

Today I wanted to cover what I call SWITCH True logic. If you haven't used the SWITCH function yet, you certainly should be.

 

It's a far superior way to write complex logic which is traditionally done with nested IF statements if you come from an Excel background.

 

In this tutorial, I run through how you can implement SWITCH to get a variety of answers depending on what sort of input or context you have in a particular report page.

 

It's a really great technique that you should be implementing in your models. It enables not only great analysis but great visualizations as well.

 


Following on from this, I want to show you how you can utilize SWITCH in an incredible way. Using SWITCH in this manner enables advanced visualization techniques in your reports.

 

You can literally create a report that is entirely dynamic. You can select something in a slicer and then change every single visualization and the results that those visualizations are showcasing.

 

I call these virtual or dynamic reports. Of course, we can do a lot of filtering and slicing of our data but a lot of that comes from our dimensions.

 

In this particular example, I focused on how you can click through or slice into different measures.

 


I definitely feel like the logic and technique here is very achievable for any Power BI user.

 

There's nothing truly difficult about implementing this type of SWITCH True logic in your models. Plus, it opens up a variety of analysis and visualizations you can create that your consumers will love.

 

All the best.

 

Sam

 

 

**** Learning Power BI? ****

FREE COURSE - Ultimate Beginners Guide To Power BI

FREE COURSE - Ultimate Beginners Guide To DAX

FREE - 60 Page DAX Reference Guide Download

FREE - Power BI Resources

Enterprise DNA Membership

Enterprise DNA Online