Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All, could anybody help me?
I have 2 columns: copmany_id and date_issued.
I'm trying to create a table that calculates count of departed companies every month. Departed company every month - count of unique copmanies that dont have purchases more than 180 days.
Main detail: copmany can be departed repeatedly
Table example that i need to show:
January 2018 February 2018 March 2018 etc
departed_copmanies
data example:
company_id date_issued
323 05.01.2018
323 31.12.2017
149 31.12.2017
etc etc
Solved! Go to Solution.
Hi @Bond700 ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Bond700 ,
How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Bond700 ,
We can create a calculated table to meet your requirement:
Table2 = ADDCOLUMNS ( FILTER ( CALENDAR ( MIN ( 'Table'[date_issued] ), MAX ( 'Table'[date_issued] ) + 211 ), DAY ( [Date] ) = 1 ), "Count", COUNTROWS ( DISTINCT ( SELECTCOLUMNS ( FILTER ( FILTER ( 'Table', 'Table'[date_issued] < [Date] - 180 ), NOT CONTAINS ( FILTER ( 'Table', 'Table'[date_issued] < [Date] && 'Table'[date_issued] >= [Date] - 180 ), 'Table'[company_id], [company_id] ) ), "id", [company_id] ) ) ) )
If it doesn't meet your requirement, Please show the exact expected result based on the Tables that you have shared.
BTW, pbix as attached.
Best regards,
Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If you query you data so that you have 1 record for the last date for each company then a calculated column like this will give you a 1 or a 0 depending on whether the company is "departed". Then it should be easy to count by month how many companies departed by just adding up the departed column
Help when you know. Ask when you don't!
Company can departe more than 1 times.
Company Date issued departed
a 1 january 2017 0
a 2 january 2017 0
a 1 january 2018 1
a 1 january 2019 1
Condition for departing: lt passed more than 180 days from the date_issued and copmany dont have other date_issued this period
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
111 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
146 | |
110 | |
93 | |
84 | |
67 |