Forum Discussion
gustavo_powerbi
4 years agoNew Member
Lost Costumers
Hi, I tried to realize a Dax measure about Lost Costumer, but I can't do this:
Running Total Sales =
VAR currentdate =
MAX ( Vtas_Zona_Atlantica[Date] )
RETURN
CALCULATE(
[AC],
FILTER (
ALLSELECTED( Vtas_Zona_Atlantica[Date] ),
ISONORAFTER( Vtas_Zona_Atlantica[Date], currentdate, DESC )
)
)
Lost Costumer =
VAR _currdate =
MAX ( Vtas_Zona_Atlantica[Date] )
VAR _Salesthisperiod = [Total Ventas]
VAR _Costumer =
ADDCOLUMNS (
Vtas_Zona_Atlantica,
"Sales Until Now",
CALCULATE(
[AC],
DATESINPERIOD( Vtas_Zona_Atlantica[Date], _currdate, -6, MONTH )
),
"Running Total Sales", [Running Total Sales]
)
VAR _LostCustomer =
FILTER (
_Costumer,
[Running Total Sales] > 0 && [Sales Until Now] = 0 )
RETURN
IF ( _Salesthisperiod > 0, COUNTROWS( _LostCustomer ) +0 )
When I put these values on the matrix table but, I don't have results.
2 Replies
- amitchandak
Super User
See if one of the two links can help you
Customer Retention Part 1:
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-1-Month-on-Month-Retention/ba-p/1361529Customer Retention Part 5: LTD Vs Period Retention
https://community.powerbi.com/t5/Community-Blog/Customer-Retention-Part-5-LTD-and-PeriodYoY-Retention-is-only/ba-p/2114497 - v-zhangti
Community Support
Hi, gustavo_powerbi
Can you provide some simplified data for testing? It can be an Excel image or a PBIX file.
Looking forward to your response.Best Regards,
Community Support Team _Charlotte
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.