Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
slanka
Helper I
Helper I

Common column from two different data sets

Mates,

 

I have two datasets 1) Forecast 2) Actual. Both the datasets having EmployeeName in common (and same values), i have also created a relationship on EmployeeName between the two datasets. I want to see both Forecast count and Actual count together in a report for a period of time (say every month for FY19), I am able to achieve this using Line chart. However, when I use Matrix/Table and add EmployeeName (from either of the datasets) in the Rows, I am getting wrong results from the other dataset. Say, if i use EmployeeName from Forecast, Actual count is getting wrong and vice versa. 

 

Any leads on this?

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @slanka ,

 

I have created a sample for your reference, please have a check.

Measure = 
VAR emname =
    MAX ( Actual[EmployeeName] )
RETURN
    SUMX (
        Actual,
        CALCULATE (
            SUM ( Forecast[value] ),
            FILTER ( Forecast, Forecast[EmployeeName] = emname )
        )
    )

Capture.PNG

 

Pbix as attached. If it doesn't meet your requirement, Kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

4 REPLIES 4
v-frfei-msft
Community Support
Community Support

Hi @slanka ,

 

I have created a sample for your reference, please have a check.

Measure = 
VAR emname =
    MAX ( Actual[EmployeeName] )
RETURN
    SUMX (
        Actual,
        CALCULATE (
            SUM ( Forecast[value] ),
            FILTER ( Forecast, Forecast[EmployeeName] = emname )
        )
    )

Capture.PNG

 

Pbix as attached. If it doesn't meet your requirement, Kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
v-frfei-msft
Community Support
Community Support

Hi @slanka ,

 

Kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.
CoreyP
Solution Sage
Solution Sage

Try creating a third table with only employee names, and use that as your dimension table. Then when you build your matrix, use the employee name field from that third table. Maybe?

Thanks for your reply! But that may not be ideal, as i have to create relationships between the tables again.. it's again creating same issue..

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors