Forum Discussion
undefined
Hi,
I have 2 tables loaded in my PBI, both of which have the same columns but data is different. One set of data is filtered on the basis of 'Company' and other set of data is filtered on the basis of 'Shareholder'. So basically this one category field is different.
I want to have a single slicer that says 'by company' and 'by Shareholder' and helps me toggle b/w the the two data set in 1 single graph/chart. So far, I have created a third table consisting of category field and this third table is linked to both the other tables.
When I try creating a slicer by category field, it populates data from one table on the chart, say by Company data when I select fields from that table. And I can see the fields populating from another data set on another chart. I want to switch bw the two data sets using the one category slicer on the same graph. Can anyone help suggest how that can be done ?
3 Replies
- jennrattenSuper User
Hello - there are a couple of options to solve this.
- You can use measures - create two measures which perform the calculation - one for each table, then create a third measure which adds the two measures together. It is this third measure which you will add to the visual.
- If the column names are the name but the rows have different data, in Power Query, you can add a new column to both tables to indicate the category, then append the two tables and load the data model - then your data will be displayed by category.
- jennrattenSuper User
Aditi27 Can you please review the proposed solution and let me know if this answers your question? Thanks!
- AnonymousNot applicable
Hi Aditi27 ,
Also consider creating the visuals using their respective tables and using bookmarks to toggle their visibility.
Create report bookmarks in Power BI to share insights and build stories - Power BI | Microsoft LearnBest Regards,
Gao
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!
How to get your questions answered quickly -- How to provide sample data in the Power BI Forum