The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
This seems like it should be fairly simple but I am struggling to figure out how to do this with power bi as I'm new to Power BI.
I essentially have the following table structure.
Table:
Country 1 | Country 2 | CLM | TNL |
USA | USA | 1 | A |
USA | Canada | 2 | B |
Canada | USA | 3 |
C |
Canada | Canada | 4 | D |
Europe | Europe | 5 | E |
India | India | 6 | F |
Singapore | Singapore | 7 | G |
I want to create and apply below dropdown filter, which will need to have all unique values from Country1 & Country2 columns
Page level Filter:
Country |
USA |
Canada |
Europe |
India |
Singapore |
Once we have that unique Country names, if we select USA from filter it will check for the USA value in both Country1 & Country2 columns and need to get the rows like below
If Filter = USA selected then result will be below, if USA is not present in Country1 row and USA present in Country2 still it will needs to fetch.
Country 1 | Country 2 | CLM | TNL |
USA | USA | 1 | A |
USA | Canada | 2 | B |
Canada | USA | 3 | C |
If Filter = USA & Canada two selected then result will be below, if Canada is not present in Country1 row and Canada present in Country2 still it will needs to fetch.
Country 1 | Country 2 | CLM | TNL |
USA | USA | 1 | A |
USA | Canada | 2 | B |
Canada | USA | 3 | C |
Canada | Canada | 4 | D |
Basically the country filter needs to check values in Country1 & Country2 column if the value is present in any of the column then that respective row needs to be featched, I want this functanility to be worked for multi select.
Please help me in figuring out the Solution.
Thanks you whoevery make time to read my query 🙂
@Suman152 , Create an independent Country Table with, do not join back
Then have measure like
countrows(filter(Table, Table[Country 1] in values(Country[Country]) || Table[Country 2] in values(Country[Country]) ))
Need of an Independent Table in Power BI - Exclude: https://youtu.be/lOEW-YUrAbE
User | Count |
---|---|
74 | |
70 | |
39 | |
30 | |
28 |
User | Count |
---|---|
104 | |
95 | |
51 | |
48 | |
46 |