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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Unknowncharacte
Helper III
Helper III

Filter Historical Data

Hi, I need to create a measure to calculate # of all cases (regardless of date opened) that were active (no closed date) at the end of each fiscal quarter and display the measure on a historical line chart. I have a Calendar table and I need to visualize the measure on it because it has fiscal year information but I am getting confused on how to capture all cases that were active. 


I did this measure, but it's counting cases that were opened in that quarter, I assume because I have a direct connection from fact table to dim calendar. How do I count and visualize this, I am confused...

 

Open Cases =
COUNTROWS( FILTER( ALL('Fact Table'),
[DateOpened] <= MAX('DIM Calendar'[Full Date])
&& [DateClosed] >= MAX('DIM Calendar'[Full Date]) ) )

 

Attaching a sample of my Power BI as well. 

Unknowncharacte_0-1697510203478.png

Sample Data.pbix

 

1 ACCEPTED SOLUTION

@Unknowncharacte , You have to use cross filter to remove the join

 

refer, blog video, or attached files after signature

 

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
Power BI HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees: https://youtu.be/fvgcx8QLqZU

 

 

 

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

View solution in original post

3 REPLIES 3
Unknowncharacte
Helper III
Helper III

I did this measure, but it's counting cases that were opened in that quarter, I assume because I have a direct connection from fact table to dim calendar. How do I count all "active" cases?

 

Open Cases = COUNTROWS( FILTER( ALL('Fact Table'), [DateOpened] <= MAX('DIM Calendar'[Full Date]) && [DateClosed] >= MAX('DIM Calendar'[Full Date]) ) )

@Unknowncharacte , You have to use cross filter to remove the join

 

refer, blog video, or attached files after signature

 

Power BI: HR Analytics - Employees as on Date : https://youtu.be/e6Y-l_JtCq4
https://community.powerbi.com/t5/Community-Blog/HR-Analytics-Active-Employee-Hire-and-Termination-tr...
Power BI HR Active Employee Tenure Bucketing, and Hired, Terminated, and Active employees: https://youtu.be/fvgcx8QLqZU

 

 

 

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

Thank you so so much! Active employee count worked perfectly for me!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.