Forum Discussion
CALUCLATE Lost Clients
Hello,
how can I show "Lost" clients?
Lost clients are clients that bought last year, but didn't yet buy this year.
Measure Lost Clients = CALCULATE( DISTINCTCOUNT(FACT_DE_VKDOK[KUNID]); FACT_DE_VKDOK[SALES_VALUE])=0; FACT_DE_VKDOK[SALES_VALUE_LAST_YEAR]<>0 )
Hi v_franz ,
Please make sure you didn’t miss your table name in Filter expression. If it doesn't meet your requirement, kindly share your sample data and excepted result to me if you don't have any Confidential Information. Please upload your files to One Drive and share the link here.
Measure for lost client = CALCULATE(DISTINCTCOUNT([Client ID]),FILTER(Table1,[Sales last year]<>0&&[Sales this year]=0))
I modified the actual measure according to your data, please try agagin.
Lost Clients = CALCULATE(DISTINCTCOUNT(FACT_DE_VKDOK[KUNID]); FILTER(FACT_DE_VKDOK; FACT_DE_VKDOK[VKWERTNETTO]=0 && FACT_DE_VKDOK[VKWERTNETTO_VJ])<>0))
Best regards,
Dina Ye
8 Replies
- v-diye-msft
Community Support
Hi v_franz
Please try this measure:
Measure for lost client = CALCULATE(DISTINCTCOUNT([Client ID]),FILTER(Table1,[Sales last year]<>0&&[Sales this year]=0))
Regards,
Dina
- v_franz
Helper I
Hello Dina,
thank you for your reply. But unfortunately it doesn't work.
PowerBI tells me, Filter doesnt work for TRUE/FALSE statements.
Where can there be the error?
--> I tried it like this also:
Lost Clients = CALCULATE(DISTINCTCOUNT(FACT_DE_VKDOK[KUNID]);FILTER(table1;sum(FACT_DE_VKDOK[VKWERTNETTO_VJ])<>0 && sum(FACT_DE_VKDOK[VKWERTNETTO])=0))But it tells me, Table1 is not a valid table, variable of functionname (sorry for the translation im Using PowerBI in German)Thank you
Viktor