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

Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.

Reply
vanessafvg
Super User
Super User

Current Fiscal month sales - DAX Error

I want to get the current sales in month for the Fiscal Date

 

this is my DAX Statement

 

Current Month Sales = CALCULATE(
SUM(Registrations[Revenue]),
FILTER('Date','Date'[FYMonthInYear] = MONTH(now())
&& 'Date'[FYYear]) = YEAR(NOW()))

 

this is the error 

A function 'FILTER' has been used in a True/False expression that is used as a table filter expression. This is not allowed

 

I am obviously missing how this statement works, help?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




1 ACCEPTED SOLUTION
Phil_Seamark
Microsoft Employee
Microsoft Employee

Please try this

 

Current Month Sales = CALCULATE(
SUM('Registrations'[Revenue]),
FILTER(
'Date',
'Date'[FYMonthInYear]=MONTH(NOW())
&& 'Date'[FYYear]=YEAR(Now()) )
)

 

 

There is a really really subtle difference in where you have your closing brackets.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

3 REPLIES 3
Phil_Seamark
Microsoft Employee
Microsoft Employee

Please try this

 

Current Month Sales = CALCULATE(
SUM('Registrations'[Revenue]),
FILTER(
'Date',
'Date'[FYMonthInYear]=MONTH(NOW())
&& 'Date'[FYYear]=YEAR(Now()) )
)

 

 

There is a really really subtle difference in where you have your closing brackets.


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

Very Nice

 

So say we are in Feb. and it works great.  But when I filter my Pivot table for Jan, the values disappear.  How could I alter my query, so it is unaffected by a date filter in my pivot table?

thanks @Phil_Seamark that works like a charm!  

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
PBIApril_Carousel

Power BI Monthly Update - April 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

April2025 Carousel

Fabric Community Update - April 2025

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