Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
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!
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?
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! 😊
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
81 | |
76 | |
61 | |
37 | |
33 |
User | Count |
---|---|
101 | |
56 | |
51 | |
45 | |
40 |