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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Compare Actual vs Budget Monthly

Hello,

 

I have two tables, the first one comes from an SQL query and is a sales report  (one row per sale), and the other one, comes from an Excel, and contains the budget. Here is an example:

 

Sales report                                                                            

Date                        Account                   Amount                                

01/01/2019            Banamex                  $25,000                                

05/01/2019            Banamex                  $15,000

07/01/2019            Santander                $8,000

08/02/2019            Banamex                  $3,000

15/02/2019            Banamex                  $11,000

22/02/2019            Santander                $12,000

27/02/2019            Santander                $5,000

 

Budget

Account             Month                Budget

Banamex            January              $45,000

Banamex            February            $20,000

Santander          January              $10,000

Santander          February            $16,000

 

The problem is that it seems that when i try to construct the following visualization, the program doesn't understand the relation beetween "Date" in Sales Report and "Month" in Budget.

 

Account             Month                Budget            Sales                   %

Banamex            January              $45,000          $40,000           88.9%

Banamex            February            $20,000          $14,000           70% 

Santander          January              $10,000          $8,000             80%

Santander          February            $16,000          $17,000          106.3%

 

Thanks in advance

 

 

 

 

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

HI, @Anonymous 

Just try this way:

Step1:

Add a Month column for Date in Sales report table by this formula

Month = FORMAT ( [Date], "mmmm" )

Step2:

Add Dim Month table and Dim Account table.

Step3:

Create the relationship as below:

5.JPG

Step4:

Create a measure for %

% = DIVIDE(SUM('Sales report'[Amount]),SUM(Budget[Budget]))

Step5:

Darg Dim field from dim table, Amount and Budget from data table and measure into a visual

Result:

6.JPG

here is pbix file, please try it.

 

Best Regards,

Lin

Community Support Team _ Lin
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

4 REPLIES 4
Usha_RK
Regular Visitor

Hi there,

 

I am new to Power BI and have tried to create a similar actuals versus budget report for our data re: software licenses. Although the budget shows correctly based on the different products, the actuals show up as the total spend for the month of Apr23. Could you please help me out?

Usha_RK_0-1686158351794.png

 My relationships look like this:

 

Usha_RK_1-1686158403151.png

 

v-lili6-msft
Community Support
Community Support

HI, @Anonymous 

Just try this way:

Step1:

Add a Month column for Date in Sales report table by this formula

Month = FORMAT ( [Date], "mmmm" )

Step2:

Add Dim Month table and Dim Account table.

Step3:

Create the relationship as below:

5.JPG

Step4:

Create a measure for %

% = DIVIDE(SUM('Sales report'[Amount]),SUM(Budget[Budget]))

Step5:

Darg Dim field from dim table, Amount and Budget from data table and measure into a visual

Result:

6.JPG

here is pbix file, please try it.

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thank you so much, this solved my problem!

calerof
Impactful Individual
Impactful Individual

Hi @Anonymous ,

 

Make sure you have a date table.

 

Then in your excel file add a column with date, and in each row write the begining of each month in the format dd/mm/yy. Use this column to establish the relationship between the date table.

 

In your excel file you can create a new column like the following:

Month = FORMAT( [Date], "MMM")

You should be able to get your information and comparisons afterwards.

 

Hope it helps.

 

Cheers,

 

Fernando

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.