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!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
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
@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
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.
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.