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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
JoyceW
Helper II
Helper II

Measure that uses Calculate and filter on year gives same value for every month in table

I have a measure that does a calculate of a sum of revenue in a sales table on filtered ledger accounts. 

 

I use a date table with date, quarter and year. The date has a relationship with the date of sales of the salestable. 

 

Then I created a second measure, that calculate's the first measure on the year in the datetable: 

Omzet HJ = CALCULATE(
[Omzet],
FILTER(ALL(Datumtabel), Datumtabel[Jaar] = YEAR(TODAY()))
 
When I add this measure in a table with month and year it shows the same value every month. When adding the [Omzet] measure it does calculate the value per month / year. So why doesn't it work with the [Omzet HJ] measure?
 
The ultimate goal is creating a table with per month: revenue last year / revenue last year + 10% (as the target) / revenue current year / difference between last year + 10% and current year. And then those values per month and quarter. It will be used as a sales target dashboard so each sales manager can see their target and whether they have reached it or not. 
 
Any help, tips or solutions are very welcome. Thank you!

 

1 ACCEPTED SOLUTION
ValtteriN
Super User
Super User

Hi,

I am not sure if I follow but you want to have the calculation on a monthly basis? Now your ALL removes all the filters from your datetable. Afterwards you specify that the year in you calculation needs to be this year, but you don't define the month filter context back. Try this: ALL(Datumtabel[jaar]). This will only remove the year context. For LY you can use YEAR(TODAY())-1 in the measure. One alternative way to do this is to add month selection to your FILTER e.g. Datumtable[Maand]=MAX(Datumtable[Maand]).

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




View solution in original post

2 REPLIES 2
JoyceW
Helper II
Helper II

Hi @ValtteriN , thank you! adding the Maand to the filter worked like a charm! 


ValtteriN
Super User
Super User

Hi,

I am not sure if I follow but you want to have the calculation on a monthly basis? Now your ALL removes all the filters from your datetable. Afterwards you specify that the year in you calculation needs to be this year, but you don't define the month filter context back. Try this: ALL(Datumtabel[jaar]). This will only remove the year context. For LY you can use YEAR(TODAY())-1 in the measure. One alternative way to do this is to add month selection to your FILTER e.g. Datumtable[Maand]=MAX(Datumtable[Maand]).

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.