0

var DateLowest=Min(DateSelector[YearDate]) --- ( 01/01/2020 00:00:00 VALUE ) 
var rest=
  CALCULATE ( 
                                    AVERAGEX(
                                            VALUES(AppUser[AppUserId]),
                                            DATEDIFF(AppUser[LastLogin],AppUser[CurrentDate],SECOND)

                                             ),
                            FILTER('Date','Date'[DateId]<=SELECTEDVALUE('DateSelector'[DateId],MAX('DateSelector'[DateId])) ), FILTER ( 'AppUser','AppUser'[LastLogin] >= DateLowest  


                                        ))

RETURN rest

I wish to exclude the AppUser[LastLogin] that are equal to 30/12/1899 00:00:00 GMT+0000 (Greenwich Mean Time). It seems that in Direct Query the DAX is more restrictive and cant cope with additional filtering so looking for another way. The above additional clause in the measure above does not work and causes Power BI to throw this error out .

The service has encountered an error processing your request. Please try again. Error code 8632. A severe error occurred on the current command. The results, if any, should be discarded.. The exception was raised by the IDbCommand interface.

I assume I will need to rewrite this in another way . Any ideas as I seem to have tried 4 or 5 things ?

1 Answer 1

1

A cheeky IF in the DATEDIFF sorted this .

IF(AppUser[LastLogin]=DATE(1899,12,30),blank(),AppUser[LastLogin]

Case closed.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.