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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

Measure based on selected periods (year,quarter, month) and based on dates present in fact table

In PBI desktop...a big challenge Im facing...

 

I need to create a measure (# of Litigation Orders) that calculates a count where status=Litigation for each order in a given period.  On the table we have a field named "start of litigation" and another field called "end of litigation" in the same "Orders table".

 

Imagine that I selected two separated periods in a date table hierarchy filter (2021,q1, m1) and (2021, q2, m5), considering that our date table has a physical relationship with the Orders table.

 

I'm eager to know how many orders were in Litigation at that periods using that measure in a line chart by Period, for example. What dax expression should I use to achieve my goal as fast as accurate?? Thanks in advance.

1 ACCEPTED SOLUTION
v-robertq-msft
Community Support
Community Support

Hi, 

Have you followed the link posted by amitchandak to find the solution to your problem?

If so, would you like to mark his reply as a solution so that others can learn from it too?

 

If you still have a problem, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

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

3 REPLIES 3
Anonymous
Not applicable

It works! Thank you!

v-robertq-msft
Community Support
Community Support

Hi, 

Have you followed the link posted by amitchandak to find the solution to your problem?

If so, would you like to mark his reply as a solution so that others can learn from it too?

 

If you still have a problem, you can post some sample data(without sensitive data) and your expected result.

How to Get Your Question Answered Quickly 

 

Best Regards,

Community Support Team _Robert Qin

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

amitchandak
Super User
Super User

@Anonymous , check if you need come think similar to active employees in this blog

https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-trend/ba-p/882970

 

Using a date table.

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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