Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Merging two datasets into one Data Table

Hey,   I am struggling with trying to return a specific type of informaion and combine into one data table.   I want a data table that shows me the following:   Technician Name Hours Budget...
  • v-alq-msft's avatar
    5 years ago

    Hi, Anonymous 

     

    Based on your description, i created data to reproduce your scenario. The pbix file is attached in the end.

    Actual:

     

    Budget:

     

    You may create a calculated table with the following dax.

    Table = 
    ADDCOLUMNS(
        Budget,
        "Hours Actually Worked",
        CALCULATE(
            SUM(Actual[Actual Value]),
            FILTER(
                Actual,
                [Name]=EARLIER(Budget[Name])&&
                [Time Sheets]="on-site time"
            )
        )
    )

     

    Result:

     

    Best Regards

    Allan

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.