Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
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.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.