Forum Discussion

Ttheodosiou's avatar
Ttheodosiou
Regular Visitor
3 years ago
Solved

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.nameColumnAColumnB
file_a.csvA1
file_a.csvB2
file_a.csvC3

file_b.csv

A1

file_b.csv

A2
file_c.csvD1
file_c.csvA1

 

 

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

ColumnAColumnbResult
A1Missing
B2Missing
A2New

 

 

if file_a and file_c

 

ColumnAColumnbResult
A1Exist
B2Missing
C3Missing
D1New
A2New
  • Anonymous's avatar
    Anonymous
    3 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

  • Ttheodosiou's avatar
    Ttheodosiou
    Regular Visitor

    as far as question 1, I have used interactions instead.

     

     

  • Anonymous's avatar
    Anonymous
    Not 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

     

  • Ttheodosiou's avatar
    Ttheodosiou
    Regular 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?