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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Yrstruly2021
Helper V
Helper V

All DAX calculations gives an error

Please assist. I tried to do calculations and it gives an error for all of them.

Yrstruly2021_0-1662207073528.png

I chnages the following DAX code to what i have in my tables:

Margins LQ = CALCULATE( [Profit Margins], DATEADD( Dates[Date], -1, QUARTER ) )
QoQ Sales Change = [Total Sales] - [Sales LQ]
Sales 1M MA =
AVERAGEX(
    DATESINPERIOD( Dates[Date], LASTDATE( Dates[Date] ), -1, MONTH ),
        [Total Sales] ) and
 
Cummulative Sales =
CALCULATE( [Total Sales],
    FILTER( ALLSELECTED( Dates ),
        Dates[Date] <= MAX( Dates[Date] )))
 
4 REPLIES 4
Yrstruly2021
Helper V
Helper V

I did that.

Yrstruly2021
Helper V
Helper V

I have hanged my data types, i believe it is correct now. Still i dont get data back, example: "

Sales LY = CALCULATE([Total Sales], DATEADD('Calendar table'[Date], -48,MONTH))"
 

Hi @Yrstruly2021 

https://we.tl/t-wvUyhckJ9W
The orders Created_DateTime column contains time in addition to date. Therefore, it matches zero dates in the calendar table. I have created a Created_Date column and linked it with Calendar[Date] and now your measure works. However, I noticed that the year slicer still have blanks, so I adjusted the start date of the calendar table to MIN ( Orders[Create_Date] ) but still have blanks. I believe your data model and requires an overall check to clean up everything.

1.png

tamerj1
Community Champion
Community Champion

Hi @Yrstruly2021 
You need to set the correct data type (Decimal) in power query 

1.png

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.