Skip to main content

Notifications

Dynamics 365 general forum

how to use with member function in where condition using mdx query

Posted on by 155

Hi,

Iam trying to display count of salesorder that took place between 0 to 30 days(that 0 to 30 days is difference between sales validity date and current date).

My query is,

 

 

 

 

 

 

With

 

Member [Measures].[NoOfDays] as

 

 

'datediff("d",Cdate([Sales orders].[SalesTableDeadlineValidityDate]

.currentmember.properties("Caption"))

,Now()) '

select

 

 

{[Measures].[NoOfDays],[Measures].[SALESID Count]} on columns,

Filter

 

 

([Sales orders].[SalesTableDeadlineValidityDate].[All].children,

[Measures].[NoOfDays]>30

 

 

and [Measures].[NoOfDays]<60) on

rows

from

 

 

[DSBU Head Role Centre]

Iam getting below error,

Execution of the managed stored procedure datediff failed with the following error: Microsoft::AnalysisServices::AdomdServer::AdomdException.

Internal error: An external component returned an error (HRESULT = ).

The following system error occurred: Type mismatch. .

 

 

 I need result in below format

NoOFDays   SalesId

30                   434

31                   658

48                   65543

59                  763

 

Can any body help.Thanks in Advance.

Regards,

Suba.

 

 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans