cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
cristianml
Post Patron
Post Patron

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,

 

1 ACCEPTED SOLUTION

@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.

View solution in original post

5 REPLIES 5
ducnguyen221
Responsive Resident
Responsive Resident

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.

 

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.

 

 

Analysis.jpgPBI Photo.jpg 

Cristian

@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.

View solution in original post

Hi, 

 

Yes it worked !. I appended both names tables leaving relationships as the attached photo. :).  Now I have to add another just for category and done.  

 

Relationships.png

Thanks for your help ! 🙂

 

Regards 

Yay!

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Get Ready for Power BI Dev Camp

Power BI Dev Camp - June 24th

Mark your calendars and join us for our next Power BI Dev Camp!

Top Solution Authors
Top Kudoed Authors