cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

Adding values to visual from one table based on input from another

Hi,

 

I have a table "AllJobs" with the following columns:

  • Date
  • Username 
  • Job
  • Revenue
  • Incentive

This table is populated on a daily basis and each row pertains to individual activities perfromed by each user. 

 

I have another table "MIncentive", with the following columns:

 

  • Date
  • Username
  • ManualIncentive

This table is prepared manually in excel: the supervisor verifies the activity and deducts incentive for any mistakes made. 

 

I need a visual that shows the following:

  • Username
  • Incentive 
  • ManualIncentive (total for the selected period on the timeline)
  • Total Incentive (=Incentive+ManualIncentive)

All the above fields should obey the related filters (username & date).

I'm running into the problem where I (apparently) need to relate both "Date" and "Username" between the tables to achieve this, but I guess that's not allowed. How do I get around this?

 

Thanks a lot in advance.

1 ACCEPTED SOLUTION
Super User III
Super User III

Hi @amalm,

 

Since you have in both tables repeateds users and dates you are running to a many to many relationship (two in this case) you must create 2 dimensions tables with unique values to make the relationship between the two tables and then make the visuals as you need.

 

dimensiontalbes.gif

 

 

 

Check the attach PBIX file with the setup.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog:

Power BI em Português





View solution in original post

4 REPLIES 4
Super User III
Super User III

Hi @amalm,

 

Since you have in both tables repeateds users and dates you are running to a many to many relationship (two in this case) you must create 2 dimensions tables with unique values to make the relationship between the two tables and then make the visuals as you need.

 

dimensiontalbes.gif

 

 

 

Check the attach PBIX file with the setup.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog:

Power BI em Português





View solution in original post

Hi @MFelix, Thanks a ton for your reply. It didn't work completely at first (the date slicer wasn't filtering the "All Jobs" table), but I made some changes: - Changed the cross filter direction "All Jobs" and "Calendar" to both, - Added the date slicer with "All Jobs [date]" instead of the "Calendar[date]".

@MFelix, Sorry, but it doesn't seem to work completely still. In either configuration, only one of the slicers (Date/User) works, but the "All Jobs" and "Incentive" table do not obey both the slicers at the same time.

Hi @amalm,

 

Can you please elaborate on wht is not working? What is the expected behavior when you click the slicers?

 

Thank you.

 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog:

Power BI em Português





Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

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

Top Solution Authors
Top Kudoed Authors