Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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!

 

 

  • 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

2 Replies

  • VijayP's avatar
    VijayP
    Community Champion

    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

    • Anonymous's avatar
      Anonymous
      Not applicable

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