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

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

Reply
Txtcher
Helper V
Helper V

Dimension table to Filter Measure - Data Model Help?

I think this is simple, but I am new to DAX and data modeling. I am using Excel & Power Query.

I have 2 tables: RS_Cases (fact table) and Date_Table (dimension table).

The goal is to create a power pivot with slicers for dates and programs to track backlog cases. The following measure calculates the total backlog:

Backlog:=CALCULATE(

COUNTROWS(RS_Cases),

FILTER(

ALL(RS_Cases),

(RS_Cases[Due By]<=MAX(Date_Table[Date]) && RS_Cases[Status]="OPEN") ||

(RS_Cases[Due By]<=MAX(Date_Table[Date]) && RS_Cases[Entrance Date]>Max(Date_Table[Date])) ||

(RS_Cases[Due By]<=MAX(Date_Table[Date]) && ISBLANK(RS_Cases[Entrance Date]) && RS_Cases[Status]="CLOSED" && RS_Cases[Status Change Date]>MAX(Date_Table[Date]))

)

)

But now I want this measure to give me the total backlog based on the program (field in RS_Cases) selected in the pivot table.

I tried building a 2nd dimension table for Program, creating a relationship with the fact table. Then tried to alter the measure above like this:

 Backlog:=CALCULATE(

COUNTROWS(RS_Cases),

USERELATIONSHIP(Programs[Program],RS_Cases[Program]),

FILTER(

ALL(RS_Cases),

(RS_Cases[Due By]<=MAX(Date_Table[Date]) && RS_Cases[Status]="OPEN") ||

(RS_Cases[Due By]<=MAX(Date_Table[Date]) && RS_Cases[Entrance Date]>Max(Date_Table[Date])) ||

(RS_Cases[Due By]<=MAX(Date_Table[Date]) && ISBLANK(RS_Cases[Entrance Date]) && RS_Cases[Status]="CLOSED" && RS_Cases[Status Change Date]>MAX(Date_Table[Date]))

)

)

I used the program field from the dimension table when I built the pivot, but the measure does not change when I filter the pivot table by program.

Where am I going wrong here?

2 REPLIES 2
FreemanZ
Super User
Super User

hi @Txtcher ,

 

try like:

Backlog:=CALCULATE(
COUNTROWS(RS_Cases),
USERELATIONSHIP(Programs[Program],RS_Cases[Program]),
FILTER(
ALL(RS_Cases[Due By], RS_Cases[Status], RS_Cases[Entrance Date], RS_Cases[Status],RS_Cases[Status Change Date]),
(RS_Cases[Due By]<=MAX(Date_Table[Date]) && RS_Cases[Status]="OPEN") ||
(RS_Cases[Due By]<=MAX(Date_Table[Date]) && RS_Cases[Entrance Date]>Max(Date_Table[Date])) ||
(RS_Cases[Due By]<=MAX(Date_Table[Date]) && ISBLANK(RS_Cases[Entrance Date]) && RS_Cases[Status]="CLOSED" && RS_Cases[Status Change Date]>MAX(Date_Table[Date]))
)
)

Thank you for your response.  Unfortunately, this solution is not working (I corrected the red filter text in it had [Status] in twice.

It gives me too low a count. To get the correct backlog count, I can't filter the RS_Cases table to only include cases sent to the Region (primary key) to the month selected, or to only cases with a Due By date in the month selected. I need to filter the entire table to get the correct counts.

Thoughts?

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.