Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi all,
Im trying to calculate the repurchase% of my clients. For that i created one new column at my client table that shows me the date of the first order of my client.
First Buy = FIRSTDATE('Vendas com Produtos'[DATA_EMISSAO_NF])
After that I need to create anothe column at my client table that shows me the date of the second order.
Second Buy = ??????
I tried to filter this firstdate formula, but it did not work.
My sales table have the clientID and the sales date.
I need help on this.
Solved! Go to Solution.
Try this
Second Buy = VAR FirstBuy = [First Buy] RETURN CALCULATE ( MIN ( 'Vendas com Produtos'[DATA_EMISSAO_NF] ), 'Vendas com Produtos'[DATA_EMISSAO_NF] > FirstBuy )
Try this
Second Buy = VAR FirstBuy = [First Buy] RETURN CALCULATE ( MIN ( 'Vendas com Produtos'[DATA_EMISSAO_NF] ), 'Vendas com Produtos'[DATA_EMISSAO_NF] > FirstBuy )
I got this error when tried this formulad.
"The expression contains many columns, but it can only be uses one columns in one expression True/False..."
Sorry, My mistake. It worked just fine. Thanks
Because you didn't use the variable as the last expression inside Filter
Just replace
Clientes[Preimeria Compra]
with
Firstbuy
Also the variable is supposed to hold the FIRSTBUY measure
User | Count |
---|---|
98 | |
89 | |
82 | |
71 | |
67 |
User | Count |
---|---|
114 | |
103 | |
100 | |
72 | |
64 |