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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
AntenPuzl
Frequent Visitor

Sequence contains more than one matching element

I get an error "Sequence contains more than one matching element" when apllying.

There are only two tables in the report. One is created by code on dax

DimDate =
ADDCOLUMNS (
    CALENDAR ("2024-01-01", "2024-09-29"),
    "DateInt", FORMAT ( [Date], "YYYYMMDD" )
)
The second is manually added one cell in Power Query.
Link to pbix
https://drive.google.com/file/d/1WC1NQijVKQbGVj-2IWNtsTdf-EiQBIRT/view?usp=drive_link
 
1 ACCEPTED SOLUTION
AntenPuzl
Frequent Visitor

Solve problem. I save file to .pbip format and delete all files in SemanticModel\definition\tables\.  In this folder was old defenition of tables.

View solution in original post

4 REPLIES 4
AntenPuzl
Frequent Visitor

Solve problem. I save file to .pbip format and delete all files in SemanticModel\definition\tables\.  In this folder was old defenition of tables.

ahadkarimi
Solution Specialist
Solution Specialist

Double-check your DimDate table for duplicate date entries.
You can use the following DAX formula:
DuplicateDates =
VAR Dates =
DISTINCT(DimDate[Date])
RETURN
FILTER(
DimDate,
NOT(Dates = EARLIER(Dates))
)

Table DimDate added via this code:

DimDate =
ADDCOLUMNS (
    CALENDAR ("2024-01-01", "2024-09-29"),
    "DateInt", FORMAT ( [Date], "YYYYMMDD" )
)

there can't be duplicates.

Greg_Deckler
Super User
Super User

@AntenPuzl Something is jacked up with that PBIX file. I would recommend turning off all preview features and then recreating that report from scratch. If I disable loading on the Table query and then try to delete the DimDate table, I still get that same error. 

 

You could check the Issues forum or open a support ticket but something isn't right about that PBIX file.

 

I have attached the stack trace



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.