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
gussie
Frequent Visitor

Calculate Active Products but filter on cancellation date between slider

Hi Guys, 

I semi new to dax, but have experience in SQL. This is a bit of a brainbuster for me. 

So I have a date slider that is cancellation date, and I want to filter 'Active' and 'Cancelled' products. However, I want to only show active products that are created before or on the MAX(cancellation_date) and that have a cancellation date of today  and are created on or after the MIN(Cancellation Date)

Something like this:

active products = active_product.product_created_date < filter.max_cancellation_date and COALESCE(active_product.cancellation_date,GETDATE()) > filter.min_cancellation_date

 

Your help would be greatly appreciated

1 REPLY 1
amitchandak
Super User
Super User

@gussie , Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

 

Refer if this blog can offer a bit of help

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

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