This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. We're covering it all. You won't want to miss it.
Learn moreLevel up your Power BI skills this month - build one visual each week and tell better stories with data! Get started
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.
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
Regards,
Xiaoxin Sheng
Hi,
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.
Thanks,
Gaurav
May be you can send a sample file without sensitive information so that i can able to help you futher.
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!!
Check out the April 2026 Power BI update to learn about new features.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 36 | |
| 28 | |
| 28 | |
| 20 | |
| 18 |
| User | Count |
|---|---|
| 65 | |
| 35 | |
| 33 | |
| 25 | |
| 24 |