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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
santhoshacc
Frequent Visitor

Help me on the below query

Hi ,

 

Kinldy help me  on this query.

 

 

I am trying to get the all rows which under date range. I am using the below query  it not shoing any result.

 

Result = CALCULATE( COUNTROWS(TimeSlicer),FILTER(ALLSELECTED(TimeSlicer),
format((TimeSlicer[Date].[Date]),"YYYY/MM/DD") <=
 
FORMAT( ([Min]),"YYYY/MM/DD") &&
format((TimeSlicer[Date].[Date]),"YYYY/MM/DD") >=
FORMAT( ([MAX]),"YYYY/MM/DD")))

 

Thanks,

Santhsoh

4 REPLIES 4
v-qiuyu-msft
Community Support
Community Support

Hi @santhoshacc,

 

If you put the date column in the slicer, you can create a measure simply like below: 

 

Measure = CALCULATE(COUNTROWS('Table1'),ALLSELECTED(Table1))
 
e3.PNG

 

Best Regards,
Qiuyun Yu 

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

Hi ,

 

Thank you !

 

But i am takeing the  value of the all , year ,month,day  from slicer (means 3 slicers: 1.yearvalue 2. month value , 3.day value.

 

i need send to these three value as date ,then i will get the result by using date.

 

 

Result = CALCULATE(COUNTROWS(TimeSlicer),filter(ALL(TimeSlicer), DATESBETWEEN(
 
(TimeSlicer[Date]),

DATEVALUE(date(SELECTEDVALUE(TimeSlicer[Year]),SELECTEDVALUE(TimeSlicer[Month]),SELECTEDVALUE(TimeSlicer[Day]))),


DATEVALUE(DATE(SELECTEDVALUE(End_TimeSlicer[EYear]),SELECTEDVALUE(End_TimeSlicer[EMonth]),SELECTEDVALUE(End_TimeSlicer[EDay]))))))

 

Thanks,

Santhosh.

Hi @santhoshacc,

 

Not sure what you mean. The measure provided before can work with three slicers. Please see attached pbix. 

 

Please share your sample pbix file and tell us your desired output. 

 

Best Regards,
Qiuyun Yu 

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

Hi,

 

Please help on the below query.

 

I am taking the value from slicer and passed into query. But is not working for me ,it says like conversion error (data converion).

 

Comparing the sliver value with Date filed in date table.

 

Result = CALCULATE(COUNTROWS(TimeSlicer),filter(all(TimeSlicer), DATESBETWEEN((TimeSlicer[Date]),

DATEVALUE(date(SELECTEDVALUE(TimeSlicer[Year]),SELECTEDVALUE(TimeSlicer[Month]),SELECTEDVALUE(TimeSlicer[Day]))),


DATEVALUE(DATE(SELECTEDVALUE(End_TimeSlicer[EYear]),SELECTEDVALUE(End_TimeSlicer[EMonth]),SELECTEDVALUE(End_TimeSlicer[EDay]))))))

Thanks,

Santhosh.

 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors