Forum Discussion
Anonymous
3 years agoNot applicable
Count Days Between Two Dates in Same Column
I am building reports in powerbi using an established data model where the security in place prevents the ability to add columns; thus I must develop a measure to calculate the number of days between...
- 3 years ago
hi Anonymous
Try to plot a table visual with UniqueIdentifier and a measure like:daysbetween =VAR _date = MAX(TableName[EventDate])VAR _datepre =MAXX(FILTER(ALL(TableName[EventDate]),TableName[EventDate]<_date),TableName[EventDate])RETURNDATEDIFF(_datepre, _date, DAY)
FreemanZ
Super User
3 years agohi Anonymous
doable. would need the info of other columns to locate date rows. could you enrich your data sample?
- Anonymous3 years agoNot applicable
Other columns, as a minimum, would include:
Unique Identifier Field (each record/row)
Eventdate (referenced originally)
Title Field
Event Summary Field
Responsible Department Field
- FreemanZ3 years ago
Super User
hi Anonymous
Try to plot a table visual with UniqueIdentifier and a measure like:daysbetween =VAR _date = MAX(TableName[EventDate])VAR _datepre =MAXX(FILTER(ALL(TableName[EventDate]),TableName[EventDate]<_date),TableName[EventDate])RETURNDATEDIFF(_datepre, _date, DAY)- Anonymous3 years agoNot applicable
Thank you! I will try this!
- FreemanZ3 years ago
Super User
hi Anonymous
and the criteria to pick dates for duration calculation?
- Anonymous3 years agoNot applicable
To include on a visual whether table, combo graph (bar (event) line (days between events)