Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Govardhan118
New 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 =
CALCULATE(Total Sales, FILTER(ALL(calendar), 'calendar'[month] = 2))


I must say that I am new to Power BI, started learning it recently.
I want to ask, is there any error in my DAX? I do not have any page-level or visual-leve filters.
For some reason, the "Total Sales" and "February Sales" are one and the same. No change in numbers. Can someone help me with this. I am unable to figure out what is wrong. For context, I downloaded the Desktop app from the Store. I don't know how this information helps, but is the issue that the app is not functioning?

 

5 REPLIES 5
Idrissshatila
Super User
Super User

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 💡



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




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.

 

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)

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.

These are so much better than mine. Thanks a lot. I will try them and see whether there's a difference.

 

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.