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
Kumshan450
Helper III
Helper III

Linking 2 dates to one Master Calendar (USERELATIONSHIP) and finding out datediff

I want to find datediff between dates in two differenct table - Receipt data and Deposition data. 

 

I want to find find below DAX Measure and Measure name is 0-3 days

 

Name for dax mesure -

 

Sumx( If date in deposition data is not blank,Then find and check difference between in date of receipt date and date in deposition slip date is  less than 3 than 1, o)

 

Both table Receipt data and Deposition data are linked to a master calender table (one active and another inactive)

 

How to use related and usarelaionshhip to do vlookup and find the datedif 

 

 

3 REPLIES 3
v-jiascu-msft
Employee
Employee

Hi @Kumshan450,

 

1. They are two tables. Why is it that the relationships are one active and another inactive?

2. Can you share a sample? Please mask the sensitive parts.

 

 

Best Regards,

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

I am sharing you the another model file where there is sales data containing date and another one Refunds containing Refund date.

 

Date in sales data and date in refund data both are linked to a master calender date data. 

 

I want to calculate dax measures

 

if date in refund data is not blank 

 

then find if the difference between the refund date and sale date exceeds more than 15 days 

 

if it exceeds 15 days then 1 elso 0

 

This will help me to fund the abnormal duration between sale data and refund date. 

Hi @Kumshan450,

 

I'm afraid you can't get the date diff in your model. There should be a column like SaleID. If your model is as you described, the result always is 0. For instance, if the Sale date is 2019-01-01, we will find the Calendar date is 2019-01-01 and the Refund date is 2019-01-01 along the relationships. The days will be 0.

Can you share a dummy sample?

 

Best Regards,

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

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.