Forum Discussion
Days Gap For Each Group
Hi All,
I want to find the gap between dates for each group. Sample data can be found here.
How will be able to do it.
Thank You,
Hi,
This is the calculated column formula i wrote. You may download my solution file from here.
=if(ISBLANK(CALCULATE(MAX(Data[Session Date]),FILTER(Data,Data[GroupId]=EARLIER(Data[GroupId])&&Data[Session Date]<EARLIER(Data[Session Date])))),BLANK(),Data[Session Date]-CALCULATE(MAX(Data[Session Date]),FILTER(Data,Data[GroupId]=EARLIER(Data[GroupId])&&Data[Session Date]<EARLIER(Data[Session Date]))))
Hope this helps.
6 Replies
- AnonymousNot applicable
Hi Kumar11109,
Do you wish to calculate days between Latest and Earliest Session Date for each group?
- Kumar11109Helper IV
No I want to calculate difference between each date for each group.
- Ashish_MathurSuper User
Hi,
Show the result in a simple Table.
- Kumar11109Helper IV
Ashish_Mathur, Do you mean the required result? If yes, its already in the sample data set. Remember this is just for three groups. Actual data size is much bigger.
- Ashish_MathurSuper User
Hi,
This is the calculated column formula i wrote. You may download my solution file from here.
=if(ISBLANK(CALCULATE(MAX(Data[Session Date]),FILTER(Data,Data[GroupId]=EARLIER(Data[GroupId])&&Data[Session Date]<EARLIER(Data[Session Date])))),BLANK(),Data[Session Date]-CALCULATE(MAX(Data[Session Date]),FILTER(Data,Data[GroupId]=EARLIER(Data[GroupId])&&Data[Session Date]<EARLIER(Data[Session Date]))))
Hope this helps.