The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Hi guys,
I am having trouble calculating the previous month lost customer revenue.
My model relies on a single way relationship between thr fact table and the time table, so that is not possible to change.
I would like to display the measure "Churn_lost_$" as shown in the picture below.
Thank you very much! 🤙
You can donload the model here:
https://drive.google.com/file/d/1MKFmtBIm1Z-yJ0--FhVRuIrZqWVV166c/view?usp=sharing
up
Hi @APIR ,
Create measure.
Step1 =
var _column=
SELECTCOLUMNS(
FILTER(ALL('FACT_Orders'),
'FACT_Orders'[Account Name 1]=MAX('Accounts'[Customer])),"Test",'FACT_Orders'[Date])
return
IF(
MAX('TIME_Table'[Date]) in _column,BLANK(),0)
Step2 =
COUNTX(ALL('Accounts'),'Accounts'[Customer])
Step3 =
IF(
HASONEVALUE('Accounts'[Customer]) , [Step1],
IF(
HASONEVALUE('TIME_Table'[Date].[Month]) && [Step2]<>[Accounts Distinct],0,BLANK()))
If your Current Period does not refer to this, please clarify in a follow-up reply.
Best Regards,
Clara Gong
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hello Clara,
First of all thank you for your time. Not correct though (yet!)
I've increased the data and the value are incorrect. Here is how I imagine the result:
I've tried many things but I still stuck.
Here is the file with more data:
https://drive.google.com/file/d/1MKFmtBIm1Z-yJ0--FhVRuIrZqWVV166c/view?usp=sharing
up
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
32 | |
31 | |
23 | |
19 | |
18 |
User | Count |
---|---|
65 | |
37 | |
33 | |
32 | |
28 |