Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago

Merge or union the results from two visuals using the same query

I have two table visuals that have two similar columns ( the column names are different). The first two visuals have different filters. I want to merge or union the two visuals into one table visual. I don't want to duplicate the query if its avoidable since the queries run long. Is there a way to merge the two visuals?  Thanks

 

Table visual 1                             Table visual 2                     Desired results

Name      ID                                Name   Num                     Name   Number

Mary      1000                             Mark    9999                      Mark    9999

                                                                                             Mary    1000

 

 

8 Replies

  • You can UNION them (the result would use the column names of whatever comes first, or you can do a SELECTCOLUMNS first to change column names.

     

    In either case that table query needs to be materialized into a Calculated Table which means it won't be dynamic any more.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Lbendin, Can you provide an example. It's not clear to me as to how to union them.

  • Anonymous's avatar
    Anonymous
    Not applicable

    No, I want to combine two visuals with two columns into a new thrid visual with two columns. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    my attempts to do this with calculated measures has not provided the correct results.

    • lbendlin's avatar
      lbendlin
      Icon for Super User rankSuper User

      There is no such thing as a calculated measure. It's either a measure or a calculated column.

       

      Anyway - add your third visual and add the columns. That's it. There's no concept of "merge visuals"  in Power BI.