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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

should not use function as part of calculate filter boolean expression?

Hi

why line 5 works well but line 6 error cause of A function 'ENDOFMONTH' has been used in a True/False expression that is used as a table filter expression. This is not allowed.

 1 Inflow_KPI2 =
2 VAR CurDate = ENDOFMONTH(Inflow_non5g[Date])
3 RETURN
4 CALCULATE( MAX(Inflow_non5g[O&M OSS&EMS]),
5      //Inflow_non5g[Date] = CurDate
6     Inflow_non5g[Date] = ENDOFMONTH(Inflow_non5g[Date])
7 )

Thanks a lot!

Smiley Tongue

2 REPLIES 2
v-yulgu-msft
Microsoft Employee
Microsoft Employee

Hi @Anonymous ,

 

You should modify the formula as below:

Inflow_KPI2 =
VAR CurDate = ENDOFMONTH(Inflow_non5g[Date])
RETURN
CALCULATE( MAX(Inflow_non5g[O&M OSS&EMS]),
Inflow_non5g[Date] = FILTER(Inflow_non5g,Inflow_non5g[Date]=ENDOFMONTH(Inflow_non5g[Date])))

 

Best regards,

Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-yulgu-msft  Thanks for help.

post from you should work, but i want to know why

 1 Inflow_KPI2 =
2 VAR CurDate = ENDOFMONTH(Inflow_non5g[Date])
3 RETURN
4 CALCULATE( MAX(Inflow_non5g[O&M OSS&EMS]),
5      Inflow_non5g[Date] = CurDate
6 )

works well. But

 1 Inflow_KPI2 =
2 VAR CurDate = ENDOFMONTH(Inflow_non5g[Date])
3 RETURN
4 CALCULATE( MAX(Inflow_non5g[O&M OSS&EMS]),
5     Inflow_non5g[Date] = ENDOFMONTH(Inflow_non5g[Date])
6 )

 

cannot, but error with A function 'ENDOFMONTH' has been used in a True/False expression that is used as a table filter expression. This is not allowed.

What's the difference between these two?

 

Regards

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.