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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
tecumseh
Helper V
Helper V

DAX OFFSET Returns An Error When a Field is changed in the Source

Hi all,

The DAX below works as expected while I use the Net Revenue field.
However if I update all references from Net Revenue to Gross Revenue, I receive an error message:

 

Error Message:
<ccon>OLE DB or ODBC error: Query (28, 13) Despite of MatchBy columns being specified, duplicated rows are encountered in OFFSET's Relation parameter. This is not allowed.

 

Seems odd since I am not changing anything in the OFFSET Parameters in the DAX Formula.
Any thoughts?

Thanks,
w

Test_T01.1 = 
/*
*
*/

VAR T10 =
SELECTCOLUMNS(
SUMMARIZE(
FILTER(
Sales,
Sales[Channel] = "Education" &&
Sales[Advertiser] <> "Accounting Adjustment" &&
Sales[Net Revenue] > 0
),
Sales[Customer],
Sales[Sales Person],
Sales[Date],
"Revenue",[Net Revenue]
),
"Customer", Sales[Customer],
"Sales Person", Sales[Sales Person],
"Date", Sales[Date],
"Revenue", Sales[Net Revenue]
)

VAR T20 =
ADDCOLUMNS(
T10,
"Previous Date",
SELECTCOLUMNS(
OFFSET(
-1,
T10,
ORDERBY([Date], ASC),
PARTITIONBY( [Customer], [Sales Person] ),
MATCHBY( [Customer], [Sales Person], [Date] )
),
[Date]
)
)

RETURN
T20




4 REPLIES 4
Ahmedx
Super User
Super User

Greg Decler is correct in his statement, but nevertheless, share a sample PBIX file so that we can help you

 

Greg_Deckler
Community Champion
Community Champion

@tecumseh There is nothing that OFFSET can do that can't be achieved without it using a simple FILTER statement. I would avoid that function, it often has issues that are almost inexplicable.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Thanks @Greg_Deckler ,

Is there a video or article that you could point me to that achieves the reults I am looking for using the FILTER statement?

Thanks,

w

@tecumseh The last third of this video explores OFFSET pretty in-depth. Starting around the 18 minute mark.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors