Forum Discussion
new customers
- Anonymous2 years ago
Thanks for the reply from Jihwan_Kim , please allow me to provide another insight:
I create a set of sample data, and add a calculate column on order table:
customername = RELATED(customer[name])Then add a calender table:
Table = CALENDARAUTO()Then create a measure:
MEASURE = VAR _getdate = MAX ( 'Table'[Date] ) VAR _getname = FILTER ( SUMMARIZE ( ADDCOLUMNS ( 'order', "_mindate", CALCULATE ( MIN ( 'order'[orderdate] ), FILTER ( ALL ( 'order' ), 'order'[customerid] = EARLIER ( 'order'[customerid] ) ) ) ), [customername], [_mindate] ), [_mindate] >= _getdate ) RETURN CONCATENATEX ( _getname, [customername], "; " )Then add a slicer:
And a card:
You can select the date from the slicer, and the outcome is the customername who never placed order before the selected date, the result is as follow:
Best Regards
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi powerbiexpert22
CC: Jihwan_Kim Anonymous
I have the same issue, is your issue resolved?
I am trying to fix the similar issue.
Data looks almost similar to your excel. I created the bins like 0-2, 2-4 etc, through dax. now I need to insert the values of customers count. but i am always getting aggregate value. if your issue is resolved please help me to fix it
Measure1:
Customer_count=
VAR _MinDate = Table[Min_Order_Date]
VAR _MaxDate = Table[Max_Order_Date]
RETURN
CALCULATE(
DISTINCTCOUNT(Table[OrderNo]),
Table[OrderDate] >= _MinDate && Table[OrderDate] <= _MaxDate,
ALLEXCEPT(Table, Table[CustomerID])
Column1:
Customer_Order_Bucket =
SWITCH(
TRUE(),
[Customer_count] = 1, "1",
[Customer_count] >= 2 && [Customer_count] <= 4, "2-4",
[Customer_count] >= 5 && [Customer_count] <= 6, "5-8",
[Customer_count] >= 9, "9+",
"Other"
But still I am getting the results like below
Please help me where i am doing wrong