This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
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 ReportingSign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 32 | |
| 26 | |
| 23 | |
| 20 | |
| 15 |
| User | Count |
|---|---|
| 64 | |
| 41 | |
| 28 | |
| 22 | |
| 22 |