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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
jacmanda
Frequent Visitor

Evaluating success based on two var dates with two different tables

Good day! 

 

I have a problem I was hoping the community could assist me with.

 

We are an Internet company that has a subscription-based model where our customer has a 12-month subscription to our site. We have a customer retention team that focuses on a customer that show Churn signs, like not logging into the website the last 30 days.

 

So our customer representatives work in google sheets - and we import customers into their workbook once a week. (G-Consultant) This provides us with a customer key (b_id) and date in. In another table I have all the log inns from our customer. (log) [b_id], [log_in_date]

 

So representitive A get's Customer B the 24.01.2019. - He then has 45 days to get that customer to log-in (Which will show up in my log table.) I want to create a measure where i can get the output "Success" or "Fail" if the customer shows up in the (log) table between 24.01.2019  and today()+45.

 

g-consultant

log

connection

 

 

Thanks in advance to anyone who can help 🙂

 

8 REPLIES 8
jacmanda
Frequent Visitor

@v-frfei-msft @parry2k

 

Anyone...? Please

Hi @jacmanda,

 

To create a measure as below.

 

Measure = IF(CALCULATE(COUNTROWS('log'),FILTER('log','log'[trig_dato]>=DATE(2019,01,24) && 'log'[trig_dato]<=TODAY()+45))>1,"Success","Fail")

Capture.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Thank you so much for your reply - however I think we might need some modification. Mostly because the filter has to be based on the inndate [kp_dato] in g-consultant and inndate {kp_dato] + 45 days as the end point. 

 

What i thought was to create a calculated coloum in g-consultant. So we calculate the measure based on what they have in their workbook.

 

So thought something like this:

var inndate=[kp_date] 

var enddate= if today() > [kp_date]+45;[kp_date]+45;today()

return

if (log[trig_dato]>=inndate && log[trig_dato] <=enddate;"Success";"Fail")

 

However I don't know how i can scan the log table based on the b_id in the G-Consultant table?? 

 

@v-frfei-msft

v-frfei-msft
Community Support
Community Support

Hi @jacmanda,

 

I think we can use USERELATIONSHIP to work on it. Could you please share your pbix to me? Please upload the files to One Drive and share the link here.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

parry2k
Super User
Super User

@jacmanda Can you repost the images?



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

i posted them in a reply @parry2k

jacmanda
Frequent Visitor

G-consultant tableG-consultant tablelog tablelog tableconnectionsconnections

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.