Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers!
Enter the sweepstakes now!Preparing for a certification exam? Ask exam experts all your questions on May 15th. Register now.
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?
Proud to be a Super User!
Solved! Go to Solution.
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.
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.
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!
Proud to be a Super User!
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
76 | |
75 | |
69 | |
47 | |
41 |
User | Count |
---|---|
62 | |
39 | |
32 | |
30 | |
28 |