Forum Discussion

Mart1980's avatar
Mart1980
Helper I
2 years ago
Solved

visualisation

Hello guys,    I have the following and what i am trying to replicate in power bi is that graph. so I want to take the achieved by month and compare to the forecast. but what the problem i am havin...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi Mart1980 ,

     

    I suggest you to transform your tables by UNPIVOT function in Power Query Editor.

    Your table will look like as below.

    Then create a DimDate to relate two tables.

    Result is as below.

    Uplift Table:

    Uplift = 
    SUMMARIZE (
        ALL ( Achieved ),
        Achieved[Website],
        Achieved[Date],
        "Uplift",
            CALCULATE (
                SUM ( Forecast[Value] ),
                FILTER (
                    Forecast,
                    Forecast[Website] = EARLIER ( [Website] )
                        && Forecast[Date] = EARLIER ( [Date] )
                )
            )
                - CALCULATE ( SUM ( Achieved[Value] ) )
    )

     

    Best Regards,
    Rico Zhou

     

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