Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hi Community,
I need help in creating a measure that calculates number of new clients in a month. For example in the following dataset,
new clients in July 2021 = 6 (that is these clients did not exist before July 2021)
Thanks in advance
Solved! Go to Solution.
@Anonymous See if this helps:
(2) New and Returning Customers - Microsoft Power BI Community
Hi @Anonymous
Please try this measure:
New Client =
Var _Date = SELECTEDVALUE('Table'[created on],today())
VAR _CurrentClient = CALCULATETABLE(VALUES('Table'[Client id]),filter(all('Table'),'Table'[created on]<date(year(_date),month(_Date)+1,01)))
Var _PastClient = CALCULATETABLE(values('Table'[Client id]),filter(all('Table'),'Table'[created on]<date(year(_date),month(_Date),01)))
Var _NewClient = EXCEPT(_CurrentClient,_PastClient)
return
COUNTROWS(_NewClient)
this measure is connected to the slicer to select the date.
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
Hi @Anonymous
Please try this measure:
New Client =
Var _Date = SELECTEDVALUE('Table'[created on],today())
VAR _CurrentClient = CALCULATETABLE(VALUES('Table'[Client id]),filter(all('Table'),'Table'[created on]<date(year(_date),month(_Date)+1,01)))
Var _PastClient = CALCULATETABLE(values('Table'[Client id]),filter(all('Table'),'Table'[created on]<date(year(_date),month(_Date),01)))
Var _NewClient = EXCEPT(_CurrentClient,_PastClient)
return
COUNTROWS(_NewClient)
this measure is connected to the slicer to select the date.
Did I answer your question? Mark my post as a solution!
Appreciate your Kudos !!
@Anonymous See if this helps:
(2) New and Returning Customers - Microsoft Power BI Community
User | Count |
---|---|
124 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
116 | |
102 | |
71 | |
61 |