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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
pistachio
Helper I
Helper I

Troubleshooting Filter - Active Projects/Open Accounts

I have a table of accounts similar to this:

Account IDDate OpenedDate ClosedStatusProductTypeID
1500311D28/07/201516/01/20193C
71603222/06/201725/02/20193C
Z10001/04/200831/12/21001C

 

I'm attempting to calculate a graph of open accounts over time. DimDate is my calendar table, with all dates from 1/1/2016 to now. My slicer for DimDate is on the page. My formula for number of open accounts is:

# Loans Open = 
    CALCULATE(
				DISTINCTCOUNT(DimAccount[AccountID]), 
					FILTER(
						DimAccount,
							DimAccount[DateOpened] <= LASTDATE(DimDate[Date])
                            && OR(DimAccount[DateClosed] >= LASTDATE(DimDate[Date]), DimAccount[status] = 1)
                            && DimAccount[ProductTypeId] <> "D"
							) 

						) 

In this example my measure would return 2 with the date slicer set to 4 April 2018. The account "Z1000" is not recognised even though it is open on 4 April 2018. Any clues?

 

The date table (DimDate) has no direct relationship to the DimAccount table either through closing or opening date. There are some indirect relationships e.g Each account has a number of AccountLogs, each AccountLog has a Date which is related to the DimDate table.

1 REPLY 1
Anonymous
Not applicable

Hey @pistachio 

It's a bit hard (for me) to assist as you are missing the DimDate table.

How does it look like?

What is DimAccount[Pk]?

 

Please update your question with the correct details.

 

Cheers!
A

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.

Top Solution Authors