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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
Anonymous
Not applicable

PowerBI 'If' function

Hi all,

 

I'm trying to a build a PowerBI dashboard that looks two identical but reports for two products (cannot be combined) using the same visuals.

 

E.g. - a bar graph and line that looks at sales in different regions. However you'd have to select 'product A/product B' and this would then be applied to all subsequent visuals on different pages. I'd need the data source in the graph to change depending on the selected product.

 

In excel I would have done an if function that would tell excel which tab to pull the data from depending on the category selected. I'm struggling to work out the equivalent function in PowerBI. 

 

All help is appreciated.

 

Thank you!

 

 

1 ACCEPTED SOLUTION
VijayP
Super User
Super User

You can use SELECTEDVALUE Function to make the Slicer/Check box value get invoked. 

Selection = SELECTEDVALUE(Table[Column])

 

Based on this You can create Report and Create Slicer showing the Product A and Product B

The moment you Select Product A , you  will see the report which shows only the result of Product A and vice a Versa

Try and let me know




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


View solution in original post

2 REPLIES 2
VijayP
Super User
Super User

You can use SELECTEDVALUE Function to make the Slicer/Check box value get invoked. 

Selection = SELECTEDVALUE(Table[Column])

 

Based on this You can create Report and Create Slicer showing the Product A and Product B

The moment you Select Product A , you  will see the report which shows only the result of Product A and vice a Versa

Try and let me know




Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
MY Blog || My YouTube Channel || Connect with me on Linkedin || My Latest Data Story - Ageing Analysis

Proud to be a Super User!


Anonymous
Not applicable

Yes, that's the function I was looking for thank you!

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

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.