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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Anonymous
Not applicable

Open OR Close date in one visualization

Hi all - 

 

I work at a Bank, we pull in our depositor data daily through a direct query. At any given time, we only have one 'production date' worth of data, which is a snapshot in time of our accounts. 

 

Our deposit data is a list of 300k+ accounts and the various attributes tied to these accounts (branch, region, product type, etc. etc.). Two of these attributes are Open Date, and Close Date. Below is an example of what the data would look like. 

 

Production DateAccount NbrBranchOpen DateClose Date
9/23/2019561465486319/2/2019 
9/23/2019673758583615/3/19827/1/2019
9/23/2019808510300319/7/2019 
9/23/2019970212360311/15/19999/10/2019
9/23/2019831610594613/30/2008 
9/23/20197128090811110/11/1992 
9/23/2019610979212327/11/1979 
9/23/2019523696467729/21/2019 
9/23/2019448882686628/14/20028/1/2019
9/23/20193847565885212/16/1987 
9/23/2019329791361625/23/1975 
9/23/2019282678309928/14/1964 

 

I'm trying to create a single table (or matrix) that shows the accounts opened and closed in the last 30 days by Branch. (The bolded items).

 

I can do them separately by setting a filter on Close Date or Open Date, respectively. But I am not sure how to put them together in one visual. I would need to show records where Close Date is in the last 30 days OR Open Date is in the last 30 days. 

 

Any help would be greatly appreciated!

 

 

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

Hi @Anonymous 

Create measures

o = DATEDIFF(MAX('Table'[open Date]),TODAY(),DAY)

c = DATEDIFF(MAX('Table'[Close Date]),TODAY(),DAY)

Measure 3 = IF([o]<>BLANK()&&[o]<=30,1,IF([c]<>BLANK()&&[c]<=30,1,0))

Capture4.JPG

 

Best Regards
Maggie
Community Support Team _ Maggie Li
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

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @Anonymous 

Create measures

o = DATEDIFF(MAX('Table'[open Date]),TODAY(),DAY)

c = DATEDIFF(MAX('Table'[Close Date]),TODAY(),DAY)

Measure 3 = IF([o]<>BLANK()&&[o]<=30,1,IF([c]<>BLANK()&&[c]<=30,1,0))

Capture4.JPG

 

Best Regards
Maggie
Community Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
johnmelbourne
Helper V
Helper V

Or try

= CALCULATETABLE( VALUES(Accounts[ACCOUNT NBR]), OR( FILTER1, FILTER2) )
amitchandak
Super User
Super User

Join both Dates with the same date dimension.  One join will be enabled and another one will be disabled.

Now in calculate use "userelation" to activate the relation you want 

 

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
johnmelbourne
Helper V
Helper V

Try

= Calculate( sum (total deposits), OR( filter1, filter2 ) ) )


If you don't wrap your filters in an OR it treats them as an AND.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors