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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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