Forum Discussion

GKK1's avatar
GKK1
Icon for Helper II rankHelper II
2 years ago

Urgent Help require If Measure resulting in wrong total

Hi, 
I am new to this platform and this is my first request. I have tried everything possible for me, however, I am still not getting the correct totals in Power BI IF statement. I need urgent help on this. I need an if statment:

Measure = var abc = IF ( SELECTEDVALUE( DIM_DATE[CALENDAR_DATE] ) < TODAY (),  1 , 0)
return sumx(values(DimAllTimeView_AccountingDate[Day]),abc)

If I do not use the SumX function I am getting a total value which is equal to the total without applying the IF statement. With using the SumX I am getting a very high total value. I have tried using Summerize function as well but that did not give me the correct result. I would really appreciate an urgent help on this. Thanks

2 Replies

    • GKK1's avatar
      GKK1
      Icon for Helper II rankHelper II

      Thanks parry2k  for your prompt response. I some how resolved this issue and getting the correct Total value. However, now I am getting a new error which says "Resources Exceeded" and is asking me to apply some filters on data. This measure is working with CalendarDate and week, but when I bring weekdays in the visual, I am getting error. I need the data with the WeekDays.