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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Analitika
Post Prodigy
Post Prodigy

Function 'DATEADD' expects a contiguous selection when the date column comes from a table on the 1-s

I have table

 

image.png

 

Calendar table

image.png

relations

 

image.png

 

Mesures

_YTD = CALCULATE ( [_Y], DATESYTD ( 'Calendar'[Date] ) )
_YTD, LY = CALCULATE ( [_YTD], DATEADD ( 'Calendar'[Date],-1,YEAR ) )
 
 Third graph have 
When i select one year it work ok
image.png
 
But if select more than one year i got error
image.png
 
Error Message:
MdxScript(Model) (8, 47) Calculation error in measure 'tbl_PL'[_YTD, LY]: Function 'DATEADD' expects a contiguous selection when the date column comes from a table on the 1-side of a bi-directional relationship.
1 REPLY 1
Anonymous
Not applicable

@Analitika  Hey Mate,

Can you create a bridge table by using this .

Choose New table then  use below function .

 

qtr Table = values(calender [yearqtr])

then create a relationship between both table using this . 

 

If required more help then visit this for more info

https://docs.microsoft.com/en-us/power-bi/transform-model/desktop-many-to-many-relationships 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.