Forum Discussion

cristianml's avatar
cristianml
Icon for Post Prodigy rankPost Prodigy
7 years ago
Solved

Compare in one table from two different queries

Hi,

 

I need to compare 2 queries: one called FORECAST and other ACTUAL. These 2 queries have same format data with : resources, hours, Payroll, Date data.

 

The problem is that sometimes in one of the queries has no data for a particular resource and when I use the Slicer to filter by a month period, It doesn't show this resource cause is not in both sides/queries. How can I solve this ?

 

Thanks and regards,

 

  • cristianmlhave you tried creating a relationship between the Forecast and Actual table?  If so, which way is it going?  

     

    Another option might be to create a "Resource" table with the names listed and join both tables to that. Then use that name as the item on your grid.

5 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi cristianml,

     

    If I am correct, you are trying to show all resources even if it doesn't have record at a specific period. To do so, you may need to create a look-up table of all resources and use the field in that table in your visuals.

     

    If you can provide data sample, It will be clearer. Thanks.

     

    • cristianml's avatar
      cristianml
      Icon for Post Prodigy rankPost Prodigy

      Hi,

       

      What we are trying to do is a comparison of resources hours/Payroll between 2 data tables (Actual and Forecast). Considering also that we need to filter by Date/Period and category. Not sure if vlook-up is usefull in this case cause every month we have new resources coming (in Actual version) and other resources that we need to remove. Forecast version (table) is base of comparison for every month, so in Actual version we found new resources and remove others. Is there any way we could avoid manual work in PBI ? The idea is if could automate by only refreshing the data so we we see the comparison table as the example below for your review and coments. I could't find attach file field here.

       

      Thanks in advance for your help.

       

       

       

      Cristian

      • JoyCornerstone's avatar
        JoyCornerstone
        Icon for Resolver II rankResolver II

        cristianmlhave you tried creating a relationship between the Forecast and Actual table?  If so, which way is it going?  

         

        Another option might be to create a "Resource" table with the names listed and join both tables to that. Then use that name as the item on your grid.