Forum Discussion
Measure
Hello Govardhan118 ,
Are you sure that they are really not equal ?
is there a relationship between the date table and the sales table ?
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Follow me on Linkedin
Vote for my Community Mobile App Idea 💡
I did. I checked the values returned by the 2 measures. They both are the same, I even checked it for different years, they were the same.
I do want to ask, is my DAX Code correct? I am trying to understand how filter modifying functions work. There is a one-to-many relationship between the 'calendar' table (dates table) and the 'sales' table, with 'sales' being on the many side of the relationship.
- mickey642 years agoSuper User
Most of the time I use this formula.
February Sales = SUMX(FILTER('sales','calendar'[month]=2),sales'[amount])
Please try that formula below, too.
February Sales = CALCULATE(Total Sales, 'calendar'[month] = 2)
- Govardhan1182 years agoNew Member
These are so much better than mine. Thanks a lot. I will try them and see whether there's a difference.
- Govardhan1182 years agoNew Member
I used the 2 formulas above. The first one couldn't be written despite there being a one-to-many relationship between my 'sales' (facts) table and 'lookup_dates' table. I do have to mention that, I came across a previous issue where I had to mark the 'lookup_dates' table as Date Table and use the 'dates' column as the Date Column. Since then, I cannot refer the column in FILTER().
The second formula worked very easily.
Thanks a lot for the help.