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
Selded
Helper III
Helper III

Measure return wrong results

I wrote the below measure to extract my current month forecast figures from a table. The measure returns correct figures for categories B,C,D and a completely different figure for category A alone.

Data Table 

Selded_0-1594853374693.png

 

 

Monthly_Toiletries_Forecast = IF([Toiletries Forecast]=0,0, CALCULATE([Toiletries Forecast],FILTER('Date',MONTH('Date'[Date])=MONTH(TODAY())),FILTER('Date',YEAR('Date'[Date]=YEAR(TODAY())))))

 

Expected results

Selded_1-1594853614294.png

 

Current Results 

 

Selded_2-1594853872103.png

 

 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

show your measure definition for [Toiletries Forecast]

 

you can simplify the filter quite a bit too 

 

Monthly_Toiletries_Forecast = IF([Toiletries Forecast]=0,0, CALCULATE([Toiletries Forecast],FORMAT('Date'[Date],"YYYYMM")=FORMAT(TODAY(),"YYYYMM")))

View solution in original post

2 REPLIES 2
lbendlin
Super User
Super User

show your measure definition for [Toiletries Forecast]

 

you can simplify the filter quite a bit too 

 

Monthly_Toiletries_Forecast = IF([Toiletries Forecast]=0,0, CALCULATE([Toiletries Forecast],FORMAT('Date'[Date],"YYYYMM")=FORMAT(TODAY(),"YYYYMM")))

@lbendlin 

 

thank you

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.