cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
amalm Regular Visitor
Regular Visitor

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

Accepted Solutions
Highlighted
Super User
Super User

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

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



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

Proud to be a Datanaut!




View solution in original post

4 REPLIES 4
Highlighted
Super User
Super User

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

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



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

Proud to be a Datanaut!




View solution in original post

amalm Regular Visitor
Regular Visitor

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

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]".
amalm Regular Visitor
Regular Visitor

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

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

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

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



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

Proud to be a Datanaut!




Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

Community News & Announcements

Community News & Announcements

Get your latest community news and announcements.

Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Community Kudopalooza

Win Power BI Swag with Community Kudopalooza!

Each week, complete activities and be qualified in the drawing for cool Power BI Swag.

Users Online
Currently online: 131 members 1,807 guests
Please welcome our newest community members: