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!Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now
Hi,
I have a list of sales by customer and by week. I'd like to identify how many new customers I have each week. In my database, I have data for last 3 years, howerver, I want to apply the formula only to the data that is after 12th week of this year.
Below is an example of the result data.
| Week | Customer | New? |
| 12 | Customer1 | yes |
| 12 | Customer2 | yes |
| 13 | Customer3 | yes |
| 13 | Customer4 | yes |
| 13 | Customer1 | no |
| 14 | Customer2 | no |
| 14 | Customer3 | no |
| 14 | Customer4 | no |
| 15 | Customer5 | yes |
| 15 | Customer6 | yes |
| 16 | Customer1 | no |
Thanks.
Hi @Anonymous ,
You could also use DAX to create a new column.
Column =
VAR a =
RANKX (
FILTER (
'Table',
'Table'[Customer] = EARLIER ( 'Table'[Customer] )
&& 'Table'[Week] >= 12
),
'Table'[Week],
,
ASC,
DENSE
)
RETURN
IF ( a = 1, "yes", "no" )
Here is the result.
Works Perfectly. Thanks for the solution
@v-eachen-msft Thanks.
This works but it takes the full database (all 3 years). I'd like to apply this only for this year.
I have applied this as a filter, but it still didn't work as expected.
Below is an example of how the visual is filtered
Thanks.
Hi @Anonymous ,
Check this code for a new column:
let
_customer = [Customer],
_currentWeek = [Week]
in
if _currentWeek = List.Min(Table.SelectRows(#"Changed Type", each [Customer] = _customer and [Week] >= 12)[Week]) then "Yes" else "No"
Just change the bold part for your last step name.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
Check out the February 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 16 | |
| 12 | |
| 9 | |
| 7 | |
| 6 |