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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Frequent Visitor

Total of Measure showing wrong value

I am having a calculated column with conditional IF statement. Using which I am trying to create the current and previous year total sales.. all the columns and measures have decimal value as datatype. But I'm getting wrong value of sum. Please guide.

My measure is 

Current year = CALCULATE (SUM(Table[Total sales], DATESBETWEEN (Calendar [Date], DATE(2022,01,01), DATE (2022,12,31)))


If i drag products in table or matrix and add this same measure it shows all correct positive value (total is 8.91M) and if I drag the same measure in card it shows me -6200 value.

Community Support
Community Support

Hi @Dshami,

Any update on this? Can you please share a pbix or some dummy data that keep the raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  


Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Regular Visitor



I have implemented the same at my end it gives me same result make sure there isn't any filter applied on the page or visual.


May be you can send a sample file without sensitive information so that i can able to help you futher.

Responsive Resident
Responsive Resident

Hi @Dshami ,


Try below measure


Measure = Sumx(summarize(tablename,[Date],"X",[Current Year]),[X])


If this post helps, then please consider Accept it as the solution, Appreciate your Kudos!!

Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.