Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
mikkelakabel
Frequent Visitor

Churn: Combining subscription dates from two data sources

Needs churn rates over time from two data sources.

 

I have :

idstart dateend date
112
21 

 

and

idstart dateend date
2 3
334

 

How do i combine as to get one table to do my measure on or how do I combine within a measure?

All help is appreciated. :).

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@mikkelakabel , Append table in Power query and the group by and take Min for start and max for end and try 

 

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

https://docs.microsoft.com/en-us/power-query/group-by

In DAX, Create a common dimension  id

and then take create a common measure check min and max for blank and use the other one

 

example

if(isblank(Min(Table1[Start Date])), Min(Table2[Start Date]),Min(Table1[Start Date]))

 

Bridge Table: https://www.youtube.com/watch?v=Bkf35Roman8&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=19

View solution in original post

3 REPLIES 3
v-angzheng-msft
Community Support
Community Support

Hi, @mikkelakabel 

 

May I ask if your problem has been solved? Is the above post helpful to you?

If  it does, could you please mark the post which help as Answered? It will help the others in the community find the solution easily if they face the same problem with you. Thank you.😀

v-angzheng-msft
Community Support
Community Support

Hi, @mikkelakabel 

 

Try to create a calculated table like this:

Table = 
var _t=SUMMARIZE(UNION('T1','T2'),[id])
var _id=SELECTCOLUMNS(_t,"_id",[id])
var _tt=
ADDCOLUMNS(_id,
    "start",
    IF(MAXX(FILTER(ALL('T1'),'T1'[id]=[_id]),[start date])<>BLANK(),MAXX(FILTER(ALL('T1'),'T1'[id]=[_id]),[start date]),MAXX(FILTER(ALL('T2'),'T2'[id]=[_id]),[start date])),
    "end",
    IF(MAXX(FILTER(ALL('T1'),'T1'[id]=[_id]),[end date])<>BLANK(),MAXX(FILTER(ALL('T1'),'T1'[id]=[_id]),[end date]),MAXX(FILTER(ALL('T2'),'T2'[id]=[_id]),[end date]))
)
return _tt

Result:

vangzhengmsft_0-1634544006953.png

Please refer to the attachment below for details. Hope this helps.

 

 

Best Regards,
Community Support Team _ Zeon Zheng


If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

amitchandak
Super User
Super User

@mikkelakabel , Append table in Power query and the group by and take Min for start and max for end and try 

 

https://radacad.com/append-vs-merge-in-power-bi-and-power-query

https://docs.microsoft.com/en-us/power-query/group-by

In DAX, Create a common dimension  id

and then take create a common measure check min and max for blank and use the other one

 

example

if(isblank(Min(Table1[Start Date])), Min(Table2[Start Date]),Min(Table1[Start Date]))

 

Bridge Table: https://www.youtube.com/watch?v=Bkf35Roman8&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=19

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.