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
ciksha
Regular Visitor

Slicer with 2 date (Approved Date & Testing Date)

Hi,

How to use slicer that can filter 'Testing Date' & 'Approved Date'? 

slicer to filter Testing Date & Approved Date.JPG

 

E.g E.g I want to filter based on month 'January' . so when I click 'January' , table below will be like this: 

slicer to filter Testing Date & Approved Date1.JPG

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ciksha , You need to create a common date table, with month, year month year etc. Join with both dates. One join will be inactive. You can activate join using userelationship

 

assume Approve Date is inactive

calculate( Countrows(Table),USERELATIONSHIP ('Table'2[Approve Date], 'Date'[Date])),

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@ciksha , You need to create a common date table, with month, year month year etc. Join with both dates. One join will be inactive. You can activate join using userelationship

 

assume Approve Date is inactive

calculate( Countrows(Table),USERELATIONSHIP ('Table'2[Approve Date], 'Date'[Date])),

 

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...

Hi, 

I've tried and compare it with actual data. I've have testing on January but some are approved on February. My 'No. Plan1' shall filter by 'Testing date'. but the output I get, the slicer also filter at common date.

Actual data.JPG

 

 Output: 

Approve Date is inactive. 

DAX : 

No. Plan1 = CALCULATE(
COUNTROWS(sortbycreateddate) ,
USERELATIONSHIP( sortbycreateddate[APPROVED DATE], 'Date'[Date]),
sortbycreateddate[Slip Category] = "Plan" && sortbycreateddate[DOCUMENT TYPE]="Delivery Confirmation Slip (DCS)"
)
 
output.JPG

 

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.