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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
JWT
Frequent Visitor

Slicer issue between related date tables

Hi

I am trying to measure number of new customers in a period. For this I want to use a custom period date slicer.

In my dataset I have to connected date tables: the date table (dim_date) and a related copy of the table (special_date), that includes a range of period filters (12 mths, YTD, MTD eg.). The two tables is related (both way relationship).

I am using this measure for new customers:

 

 

 

New Customers = 
VAR currentCustomers = VALUES(fact_sales_invoiced[email])
VAR currentDate = MIN(dim_date[date])
VAR pastCustomers = CALCULATETABLE(VALUES(fact_sales_invoiced[email]),ALL(dim_date[date]),dim_date[date]<currentDate)
VAR newCustomers = EXCEPT(currentCustomers,pastCustomers)

RETURN 
COUNTROWS(newCustomers)

 

 

The measure works if I use the dim_date table to slice by, but not the special_date table. It seems that the problem is the calculations of "pastCustomers" that doesn't work when I slice by "special date" periods. The "special date" slicer works for everything else!

 

Any ideas why this doesn't work?

Thanks in advance!

2 REPLIES 2
lbendlin
Super User
Super User

In my dataset I have to connected date tables: the date table (dim_date) and a related copy of the table (special_date), that includes a range of period filters (12 mths, YTD, MTD eg.). The two tables is related (both way relationship).

What prevents you from merging these tables?

JWT
Frequent Visitor

Yes, maybe that is the best way to go about it. I guess it was just my preference to keep the data table "clean" from additions. Still bothers me that it does not work! 😊

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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