Forum Discussion
Recurrencia de clientes
Tengo que contar la cantidad de veces que un cliente llamo mes a mes considerando las bonificaciones. Ejemplo, en caso de llamar el mes 5 y conseguir una bonificacion de dos meses, si llamara en el mes 7 se consideraria como consecutiva.
espero puedan ayudarme
- Anonymous2 years ago
Hi Nicopato ,
I create a table as you mentioned.
Then I create a calculated column.
EffectiveEndMonth = 'Table'[CallMonth] + 'Table'[BonusMonths]Next you can create a measure and you can let it into a card or a Clustered column chart.
CallsWithBonus = VAR CurrentMonth = MAX('Table'[CallMonth]) RETURN CALCULATE( COUNTROWS('Table'), FILTER( 'Table', 'Table'[CallMonth] <= CurrentMonth && 'Table'[EffectiveEndMonth] >= CurrentMonth ) )Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- lbendlin
Super User
what if you call in month 5, get a two month bonus, and call in month 6 again?
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information or anything not related to the issue or question.
If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-p/963216
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523 - AnonymousNot applicable
Hi Nicopato ,
I create a table as you mentioned.
Then I create a calculated column.
EffectiveEndMonth = 'Table'[CallMonth] + 'Table'[BonusMonths]Next you can create a measure and you can let it into a card or a Clustered column chart.
CallsWithBonus = VAR CurrentMonth = MAX('Table'[CallMonth]) RETURN CALCULATE( COUNTROWS('Table'), FILTER( 'Table', 'Table'[CallMonth] <= CurrentMonth && 'Table'[EffectiveEndMonth] >= CurrentMonth ) )Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.