Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
While creating a new measure, the following code worked just fine until I added the last filter within 'Calculate', then I got the error message shown below. I'm not sure how to correct this, or where to find the table filter the message indicates. Can someone help me understand what is happening here?
Solved! Go to Solution.
CALCULATE filters cannot use measures by themselves. You'd need to use a FILTER() function there.
AvgParkedByNoon = CALCULATE(
SUM(SMSYTD[ParkedByNoon])/DISTINCTCOUNT('Calendar'[Date]),
'Calendar'[IsHoliday]=FALSE(),
FILTER('Calendar','Calendar'[Day of Week]=[DoWtoday])
)So without loading this in and testing it, the above should work. See this article for more info on why FILTER is sometimes necssary within CALCULATE.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingHi,
Paste the formula in the body of the message. I will make the correction.
Okay, Thanks.
AvgParkedByNoon = CALCULATE(
SUM(SMSYTD[ParkedByNoon])/DISTINCTCOUNT('Calendar'[Date]),
'Calendar'[IsHoliday]=FALSE(),
'Calendar'[Day of Week]=[DoWtoday]
)
CALCULATE filters cannot use measures by themselves. You'd need to use a FILTER() function there.
AvgParkedByNoon = CALCULATE(
SUM(SMSYTD[ParkedByNoon])/DISTINCTCOUNT('Calendar'[Date]),
'Calendar'[IsHoliday]=FALSE(),
FILTER('Calendar','Calendar'[Day of Week]=[DoWtoday])
)So without loading this in and testing it, the above should work. See this article for more info on why FILTER is sometimes necssary within CALCULATE.
DAX is for Analysis. Power Query is for Data Modeling
Proud to be a Super User!
MCSA: BI ReportingThe Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 39 | |
| 37 | |
| 33 | |
| 32 | |
| 29 |
| User | Count |
|---|---|
| 133 | |
| 88 | |
| 85 | |
| 68 | |
| 64 |