Forum Discussion
Compare two tables by slider
Hello,
I am new to power bi and I would like your support on how to achive the below:
I have a couple of .csv files in a folder and i was thinking to import the folder and expand the tables.
| Source.name | ColumnA | ColumnB |
| file_a.csv | A | 1 |
| file_a.csv | B | 2 |
| file_a.csv | C | 3 |
file_b.csv | A | 1 |
file_b.csv | A | 2 |
| file_c.csv | D | 1 |
| file_c.csv | A | 1 |
Question 1:
I would like to give the option to the end user to select two tables (maybe from a slider) and compare the two tables. How is this possible
Question 2:
Compare the two tables with and get the below results.
if file_a and file_b
| ColumnA | Columnb | Result |
| A | 1 | Missing |
| B | 2 | Missing |
| A | 2 | New |
if file_a and file_c
| ColumnA | Columnb | Result |
| A | 1 | Exist |
| B | 2 | Missing |
| C | 3 | Missing |
| D | 1 | New |
| A | 2 | New |
- Anonymous3 years ago
Hi Ttheodosiou ,
Question1:
You could use slicers and measures.
slicer1 = DISTINCT('Table'[Source.name])slicer2 = DISTINCT('Table'[Source.name])Measure1 = IF(SELECTEDVALUE('Table'[Source.name]) = SELECTEDVALUE(slicer1[Source.name]),1,0)Measure2 = IF(SELECTEDVALUE('Table'[Source.name]) = SELECTEDVALUE(slicer2[Source.name]),1,0)Question2:
You can not use slicer to control which column to show in the visual.
Best Regards,
Jay
4 Replies
- TtheodosiouRegular Visitor
as far as question 1, I have used interactions instead.
- AnonymousNot applicable
Hi Ttheodosiou ,
Question1:
You could use slicers and measures.
slicer1 = DISTINCT('Table'[Source.name])slicer2 = DISTINCT('Table'[Source.name])Measure1 = IF(SELECTEDVALUE('Table'[Source.name]) = SELECTEDVALUE(slicer1[Source.name]),1,0)Measure2 = IF(SELECTEDVALUE('Table'[Source.name]) = SELECTEDVALUE(slicer2[Source.name]),1,0)Question2:
You can not use slicer to control which column to show in the visual.
Best Regards,
Jay
- TtheodosiouRegular Visitor
As far as the question 2:
Is it possible to get the value of slicer into a parameter and then generate a new table with removematchingrows?
- AnonymousNot applicable
Hi Ttheodosiou ,
I'm affraid that's not possible. You can not create a table based on slicer values. Even if you can, the table won't change after you select another value in slicer.
Maybe you could consider to use bookmark, but then you will need to bookmark all possible outcomes in advance.
Create report bookmarks in Power BI to share insights and build stories - Power BI | Microsoft Learn
Best Regards,
Jay