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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.