Forum Discussion
Difference between 2 columns in power bi
From your data it is clearly shows that there NULL entry in key column (LPO_Key) in LPO_Excel table(Refer screen shot below) . So clear out this null values and then create one-to-many relation.
yes i checked and also i checked from original source . .date is fine.. i just need dax command how should i get days from two dates thats it
- Tahreem247 years ago
Super User
As your both the dates are coming from two different table. So in order to find the difference between these two date you'll have to create first relationship and then create measure to subtract from both the date value.
I have created some dummy tables that matches with your requirement and it gives truly expected value. Please see the step wise details in below screen shot:
If I did answer your question,So please this as a solution.
- Bakhtawar7 years ago
Post Patron
hello i want difference in numbes.. not in date.. and is this possible to first convert dates into number then minus both dates ?
- Tahreem247 years ago
Super User
Number in terms of Day,month,or Year?
IF you want differences in number od Day, Month,Year etc. so this can be achieved by DATEDIFF or DATEDIFF DAX function.
Syntax:
1) DATEDIFF(Date1,Date2,Interval)
2)DATEDIFF(Date1,Date2,Interval)
Here Interval can be Day,month,Quater,year,Minute etc.
Please mark this answer as a solution so other will get help from this.
- Bakhtawar7 years ago
Post Patron
hello i already tried that DATEDIFF function but when i tried eg .
DATEDIFF( here then i am trying to call date field CLM_INT_DT ) then this field did not appear