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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

DAX error "The end of the entry has been reached" / "Het einde van de invoer is bereikt"

Hello,

 

I am trying to find the latest id with the same key (sleutel)

Where did I go wrong

 

--------

IsLaatstVeranderdDateByID = Distinct(Rule_Result_Rowwise[ID]) =
CALCULATE(
MAX(Rule_Result_Rowwise[ID];
FILTER(ALL(Rule_Result_Rowwise); Rule_Result_Rowwise[SLEUTEL] = EARLIER(Rule_Result_Rowwise[SLEUTEL]))))
-------
Sleutel = Rule_Result_Rowwise[PK_VALUE]&Rule_Result_Rowwise[ERROR_COLUMN_NAME]&Rule_Result_Rowwise[ERROR_COLUMN_VALUE]
1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

You could create a column to calculate the last id for each key, then create a measure to compare with last id and the id,

 

last id column = CALCULATE(MAX('Table'[id]),FILTER('Table','Table'[Sleutel]=EARLIER('Table'[Sleutel])))

measure
true/false = MAX([id])=MAX([last id column])

 

or creatCapture3.JPG

or create measures
distinctount per sleutel = CALCULATE(DISTINCTCOUNT('Table'[id]),ALLEXCEPT('Table','Table'[Sleutel]))
 
ture/false 2 = MAX([last id column])=[distinctount per sleutel]
 
Capture4.JPG
 
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

You could create a column to calculate the last id for each key, then create a measure to compare with last id and the id,

 

last id column = CALCULATE(MAX('Table'[id]),FILTER('Table','Table'[Sleutel]=EARLIER('Table'[Sleutel])))

measure
true/false = MAX([id])=MAX([last id column])

 

or creatCapture3.JPG

or create measures
distinctount per sleutel = CALCULATE(DISTINCTCOUNT('Table'[id]),ALLEXCEPT('Table','Table'[Sleutel]))
 
ture/false 2 = MAX([last id column])=[distinctount per sleutel]
 
Capture4.JPG
 
Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
sturlaws
Resident Rockstar
Resident Rockstar

Hi @Anonymous, 

 

could you explain what you are trying to do? Is IsLaatstVeranderdDateByID a column or a measure? This part of your code: Distinct(Rule_Result_Rowwise[ID]) = CALCULATE(..., do you want to return true/false?

 

Cheers,
Sturla

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 FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors