Reply
Frequent Visitor
Posts: 9
Registered: ‎12-25-2018
Accepted Solution

RE: help me on the below query.

i am trying to get the count of rows between the date range ,i am using the below equery  but i am not getting result.
 
YearMax = select the value from the slicer which contains all the years(2001,2002,2003...) (user can select the year value)
MonthMax = month value(1 to 12)
DayMax =day value(1 t0 31)
like wise YearMin,month Min.,daymin
 
User can select the dynamically date values  by using slicer,based on the values we need to show the result.
 
Please help me on the below query .
 
Filter2 = CALCULATE(COUNTROWS(TimeSlicer),filter(TimeSlicer,
DATESBETWEEN(TimeSlicer[Date],date([YearMin],[MonthMin],[MinDay]),date([YearMax],[MonthMAx],[DayMax])))
)
 
Thanks,
SanthoshACC

Accepted Solutions
Community Support Team
Posts: 1,648
Registered: ‎07-10-2018

Re: RE: help me on the below query.

Hi @santhoshacc,

 

Does that make sense? If so, kindly mark my answer as a solution to close the case.

 

Regards,
Frank

Community Support Team _ Frank
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


All Replies
Community Support Team
Posts: 1,648
Registered: ‎07-10-2018

Re: RE: help me on the below query.

Hi @santhoshacc,

 

I made one sample for your reference. Just create a measure as below.

 

Filter2 = CALCULATE(COUNTROWS(TimeSlicer),DATESBETWEEN(TimeSlicer[Date],DATE(SELECTEDVALUE(YearMin[Value]),SELECTEDVALUE(MonthMin[Value]),SELECTEDVALUE(DayMin[Value])),DATE(SELECTEDVALUE('Year Max'[Value]),SELECTEDVALUE(MonthMax[Value]),SELECTEDVALUE(DayMax[Value]))))

Capture.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Attachment
Frequent Visitor
Posts: 9
Registered: ‎12-25-2018

Re: RE: help me on the below query.

Thank you for your help on this issue. When i am seeing the filter data in table (not in Measure) it is showing nothing.May be we have to write the another dax expression if possible. Please provide the solution for this. Thanks, Santhosh. Happy Xmas...
Community Support Team
Posts: 1,648
Registered: ‎07-10-2018

Re: RE: help me on the below query.

Hi @santhoshacc,

 

Could you please share your sample data and excepted result to me? You can upload your files to onedrive and share the link here.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Frequent Visitor
Posts: 9
Registered: ‎12-25-2018

Re: RE: help me on the below query.

Hi,

 

 

Thank you !

 

Thanks,

Santhosh.

Community Support Team
Posts: 1,648
Registered: ‎07-10-2018

Re: RE: help me on the below query.

Hi @santhoshacc,

 

Could you please share the files again? I cannot see any link in your last post.

 

Reagrds,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Community Support Team
Posts: 1,648
Registered: ‎07-10-2018

Re: RE: help me on the below query.

Hi @santhoshacc,

 

Does that make sense? If so, kindly mark my answer as a solution to close the case.

 

Regards,
Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.