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
TimmK
Helper IV
Helper IV

Budget Sum per Year for Each Row of the Same Year

I have the three tables budget, revenue and date that I use for a matrix table in my report. The date column of the date table is connected to the date colums of the budget and revenue table. I use the date format DD.MM.YYYY.

 

As you can see below I want to see the budget sum of the whole year for each year for each row. Thus, for 2022 I want that each row is 17500 and for 2021 and I want that each row is 13100. However, when I apply my DAX formula I get 30600 instead for each row (which is the sum of 17500 and 13100).

 

What DAX formula should I use to get the desired result?

 

This is the DAX formula I currently use:

CALCULATE(
   SUM(
   Budget[Budget]),
   ALLEXCEPT('Date','Date'[Month])
)

 

Table.PNG

1 ACCEPTED SOLUTION

Hi @TimmK ,

 

I think you should be using the date hierarchy in the matrix, then try the following formula:

 

 

Measure = 
CALCULATE(
   SUM(
   Budget[Budget]),
   ALLEXCEPT('Date','Date'[Date].[Year])
)

 

vkkfmsft_0-1652163244869.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
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

3 REPLIES 3
tamerj1
Super User
Super User

Hi @TimmK 
Almost there

Budget I Want =
CALCULATE(
   SUM(
   Budget[Budget]),
   ALLEXCEPT('Date','Date'[Year])
)

Thanks, but this formula still results in "Budget I get". What could be possibly the reason? In the data model I connected the date fields correctly. Also, the column "Budget" is displayed correctly, it shows the correct values for each month and year.

Hi @TimmK ,

 

I think you should be using the date hierarchy in the matrix, then try the following formula:

 

 

Measure = 
CALCULATE(
   SUM(
   Budget[Budget]),
   ALLEXCEPT('Date','Date'[Date].[Year])
)

 

vkkfmsft_0-1652163244869.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

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.

Top Solution Authors