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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Vijay08V
Helper III
Helper III

DAX Measure showing incorrect values in different charts

Hi,

 

I am using below given measure to show error counts based on domain and error category, but not sure why I am getting values in the category chart where I am suppose to get only zeroes as values. Can someone tell me where I'm going wrong in the DAX

 

ERROR COUNT = VAR SELECTED_YR = SELECTEDVALUE(TBL_Sample_Quality[YEAR],YEAR(TODAY()))

             VAR START_DATE =  DATE(SELECTED_YR,-5,01)

             VAR END_DATE = DATE(YEAR(TODAY()),MONTH(TODAY()),01)

             VAR ERROR_COUNT = CALCULATE(COUNT(TBL_Sample_Quality[Issue]),TBL_Sample_Quality[Date]>=START_DATE && TBL_Sample_Quality[Date]<END_DATE )+0

             RETURN ERROR_COUNT

 

image.pngimage.png

2 REPLIES 2
amitchandak
Super User
Super User

@Vijay08V , You need -5 month or 5th month

VAR START_DATE = DATE(SELECTED_YR,-5,01)

 

or

 

VAR START_DATE = DATE(SELECTED_YR,5,01)

 

Also use filter here

 

VAR ERROR_COUNT = CALCULATE(COUNT(TBL_Sample_Quality[Issue]),filter(TBL_Sample_Quality, TBL_Sample_Quality[Date]>=START_DATE && TBL_Sample_Quality[Date]<END_DATE )) +0

 

and try

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

I need -5 Months values on chart. Also I tried using filter function in the dax as you had mentioned but still I am having same issue.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.