Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Comparing two data sources

I am using two data sources in one report, one is an excel file and the other is a sharepoint list. Both data sources are very similar to each other and what I want to do is compare the two data sources using a slicer. Basically I want to be able to choose between showing the common records and different records of the two data sources in my visuals. How do I achieve this?

 

Any help would be grealy appreciated!

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi Anonymous ,

     

    According to your description, I did the test: tableA and tableB are from two data sources, which include the same records as well as different records in both tables. Need to create a separate calculated table as slicer to combine the records from both tables on one column. Create the following two measures to determine if the values filtered by the slicer exist in the table. Refer to the following:

    slicer = UNION(DISTINCT(TA_record[TableA_record]),DISTINCT(TB_record[TableB_record]))
    M1 =
    var sel = SELECTEDVALUE(slicer[slicer_record])
    return
    IF(MAX(TA_record[TableA_record])=sel,1,0)

    If the problem is still not resolved, please point it out. Looking forward to your reply.


    Best Regards,
    Stephen


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

2 Replies

  • bcdobbs's avatar
    bcdobbs
    Community Champion

    Is there a common identifier on both eg an Id or something that identifies rows uniquely?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

     

    According to your description, I did the test: tableA and tableB are from two data sources, which include the same records as well as different records in both tables. Need to create a separate calculated table as slicer to combine the records from both tables on one column. Create the following two measures to determine if the values filtered by the slicer exist in the table. Refer to the following:

    slicer = UNION(DISTINCT(TA_record[TableA_record]),DISTINCT(TB_record[TableB_record]))
    M1 =
    var sel = SELECTEDVALUE(slicer[slicer_record])
    return
    IF(MAX(TA_record[TableA_record])=sel,1,0)

    If the problem is still not resolved, please point it out. Looking forward to your reply.


    Best Regards,
    Stephen


    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.