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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

Find out what's new and trending in the Fabric Community.