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.
Hey all,
I have a very simple model, Date table & Data table. Data table has a Date type column. I need to create a measure calculating DATESDIFF or even DATESBETWEEN my date column and TODAY().
When writing the measure though, my date column is not available to use (actually only measures are available, not columns). Am I not getting something here as far as setup is concerned?
Solved! Go to Solution.
Hi @Thimios ,
The function expects a scalar value.
Try by wrapping your date column with SELECTEDVALUE(), for instance.
Hi @Thimios
A measure using SELECTEDVALUE() as @Payeras_BI suggests will work.
Measure = DATEDIFF(SELECTEDVALUE('Table'[Date]),TODAY(),DAY)
Regards
Phil
Proud to be a Super User!
@Thimios ,
Take MAX or MIN o the date.
Proud to be a Super User!
Hi @Thimios
A measure using SELECTEDVALUE() as @Payeras_BI suggests will work.
Measure = DATEDIFF(SELECTEDVALUE('Table'[Date]),TODAY(),DAY)
Regards
Phil
Proud to be a Super User!
Hi @Thimios,
Try creating a calculated column using the below DAX formula:
Column = CALCULATE(COUNTROWS(DateTable),DATESBETWEEN(DateTable[Date],DateTable[Date],TODAY()))
Hi @Thimios ,
The function expects a scalar value.
Try by wrapping your date column with SELECTEDVALUE(), for instance.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
97 | |
80 | |
69 | |
59 |
User | Count |
---|---|
150 | |
119 | |
104 | |
87 | |
67 |