Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code FABINSIDER for a $400 discount.
Register nowThe Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.
Hi,
I saw this code snippet in a wokrshop held by Jeffrey Wang. The snippet defines a measure to calculate the number of returning customers by date, in a very standard data model with sales, products and customers.
-----------------------
Solved! Go to Solution.
Good spot! This ALL(...) is not necessary. It serves no purpose, even though it's not harmful, either. The FILTER overwrites any filter present on the column anyway, so removing any filters via ALL is redundant.
Good spot! This ALL(...) is not necessary. It serves no purpose, even though it's not harmful, either. The FILTER overwrites any filter present on the column anyway, so removing any filters via ALL is redundant.
Hey daxer, thanks for the explanation!
Hi @amitchandak , thanks a lot for taking the time to answer, but I am not sure it responds to the question i had. In any case, it is much appreciated.
@Anonymous , I usually follow a measure approch
Current = sum(Table[Sales])
past =
Var _min = minx(allselected('Date'), Date[Date])
return
calculate(sum(Table[Sales]), filter(all('Date'), Date[Date] <_min)
new = countx(values(customer[Customer]), if(not(isblank([Current])) && isblank([Past]) , [Customer], bank()))
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
User | Count |
---|---|
24 | |
12 | |
11 | |
10 | |
9 |
User | Count |
---|---|
18 | |
14 | |
14 | |
13 | |
12 |