Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Expert
i can create New/Returning/Lost Customer in only 1 date table
but i want to know how to create 2 date table
my data used 2 period
Ex:
Datatable = Tran
Date table = Period1 and Period2
** Thank @amitchandak in code below
Period1 Sales = (
VAR _Cuur_start = Min(Period1[Period1])
VAR _Curr_END = Max(Period1[Period1])
return
calculate(sum('Tran'[Amount]),'Tran'[DATE] >= _Cuur_start && 'Tran'[DATE] <= _Curr_END )
)
Period2 Sales = (
VAR _Cuur_start = Min(Period2[Period2])
VAR _Curr_END = Max(Period2[Period2])
return
calculate(sum('Tran'[Amount]),'Tran'[DATE] >= _Cuur_start && 'Tran'[DATE] <= _Curr_END ))
How to create
New/Returning/Lost Customer base on Period1 and count/sum in Period2
Hi @nanutum ,
I don't quite understand what you want. Please share me some sample data and the result you want.
Best Regards,
Icey
hi @Icey
Ex:
Sample
Calcucate Base on DATE Period1 Table and DATE Period2 Table
Filter Period1 on 2019 06 - 2019 10
Filter Period2 on 2019 12 - 2020 02
** Period1 and Period2 can Flexible
Hi @nanutum ,
I'm not sure if my understanding is correct. Please check:
Try to create another Date table, and then create relationship with your fact table.
Then, create a Matrix visual based on the Date column of the new Date table and put the measure below in Values field.
Measure =
SWITCH (
TRUE (),
[Period1 Sales] = BLANK ()
&& [Period2 Sales] <> BLANK (), "New",
[Period1 Sales] <> BLANK ()
&& [Period2 Sales] <> BLANK (), "Return",
[Period1 Sales] <> BLANK ()
&& [Period2 Sales] = BLANK (), "Lost"
)
Best Regards,
Icey
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Icey
Thank you for help me
i already done about Period1 Sales and Period2 Sales
Period1 Sales = (
VAR _Cuur_start = Min(Period1[Period1])
VAR _Curr_END = Max(Period1[Period1])
return
calculate(sum('Tran'[Amount]),'Tran'[DATE] >= _Cuur_start && 'Tran'[DATE] <= _Curr_END )
)
Period2 Sales = ( VAR _Cuur_start = Min(Period2[Period2]) VAR _Curr_END = Max(Period2[Period2]) return calculate(sum('Tran'[Amount]),'Tran'[DATE] >= _Cuur_start && 'Tran'[DATE] <= _Curr_END ))
How to measure create New/Returning/Lost Customers sum amount
i found create Measure New/Returning/Lost Customers. But only 1 period
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
100 | |
78 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
94 | |
84 | |
67 |