Forum Discussion
JorgeMolano
4 years agoFrequent Visitor
Date Diff using date Filter
Hi community, I want to create a measure that calculate the days between the oldest date of my table and a day selection based on date filter. For insance, using the table below, the oldest date...
- Anonymous4 years ago
Hi JorgeMolano
What if no selection in the slicer? What do you want to display, the blank? Modify the table and column name accordingly
test = VAR CurDate=SELECTEDVALUE(DateTable[Dates]) VAR MinDate = MINX(ALL(DateTable[Dates]),DateTable[Dates]) RETURN DATEDIFF(MinDate,CurDate,DAY)
JorgeMolano
4 years agoFrequent Visitor
Hi Vera,
Thanks for your support, I tried the measure you shared but only shows a consecutive number per each row, dont calculate the number of days between 2 different dates.
Best!
Ashish_Mathur
4 years agoSuper User
Hi,
The formula suggested by Vera should work for sure. Make sure you write it as a measure (not a calculated column) and drag that measure to a card visual.