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

Did you hear? There's a new SQL AI Developer certification (DP-800). Start preparing now and be one of the first to get certified. Register now

Reply
Mart1980
Helper I
Helper I

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 having is that if i unpivot the month columns then the forecast values are not separated from the achieved values. And i cannot change the format of this excel file as this is how it is currently set up to be worked on.Any help please? Screenshot 2023-09-04 205339.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Mart1980 ,

 

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

Your table will look like as below.

vrzhoumsft_0-1693984216174.png

Then create a DimDate to relate two tables.

Result is as below.

vrzhoumsft_1-1693984393847.png

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] ) )
)

vrzhoumsft_2-1693984666907.png

 

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.

 

View solution in original post

5 REPLIES 5
TomMartens
Super User
Super User

Hey @Mart1980 ,

 

provide an Excel file that contains sample data. Then, it will be possible to provide you with a pbix that creates a table that looks like this:
datatype | website | date | value

Make sure that the Excel file represents the structure of your original 100%.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hello Tom,

 

thank you for your quick reply. Please find below as it is not allowing me to add excel files here.

achieved     
WebsiteJan-19Feb-19Mar-19Apr-19May-19
x1210131620
y1311141821
z1412151922
      
Uplift     
WebsiteJan-19Feb-19Mar-19Apr-19May-19
x25812
y36993
z471065
      
Forecast     
WebsiteJan-19Feb-19Mar-19Apr-19May-19
x1415211722
y1617232724
z1819252527

 

thank you in advance

Hey @Mart1980 ,

 

please create an Excel, that exactly represents the structure of the original data, as well as the distribution across multiple pages in the same file if not all data is available from a single sheet.
Upload the pbix to onedrive, Google Drive, or dropbox and share the link. Make sure that no login is required to download the file.

 

Regards,

Tom



Did I answer your question? Mark my post as a solution, this will help others!

Proud to be a Super User!
I accept Kudos 😉
Hamburg, Germany

Hello,

 

Here is the link. https://docs.google.com/spreadsheets/d/1p9ztpr6kNlLW6mxGMSPn7zGq8WBdtphP/edit?usp=sharing&ouid=10936...

all data that i need is on one page 😄

 

best,

Marta

Anonymous
Not applicable

Hi @Mart1980 ,

 

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

Your table will look like as below.

vrzhoumsft_0-1693984216174.png

Then create a DimDate to relate two tables.

Result is as below.

vrzhoumsft_1-1693984393847.png

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] ) )
)

vrzhoumsft_2-1693984666907.png

 

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.

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.