Forum Discussion
Govardhan118
2 years agoNew Member
Measure
I have inserted a table in Power BI report. Just 2 columns "Total Sales" and "February Sales". The DAX measures for these are as follows- Total Sales = SUM('sales'[amount]) February Sales = CALCU...
mickey64
2 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)
Govardhan118
2 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.