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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

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
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

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.