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.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
110 | |
94 | |
82 | |
66 | |
58 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |