March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
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!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
15 | |
12 | |
9 | |
8 |
User | Count |
---|---|
41 | |
32 | |
29 | |
12 | |
12 |