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.
Hi Community!
I have a field that contains dates by assessment for every client -- my goal is to calculate the datediff between each assessment (in the order they are given) by client. I'm not interested in the client level detail, rather I'm ultimately looking to show the overall average number of days between assessments (from Assessment 1 to Assessment 2, Assessment 2 to Assessment 3... and so on...) across all clients.
Since the dates are all in the same field, as are the assessment names, I figured I'd just build a few calculated columns.
I created a calc column for Assessment 1 and pulled in the date, now I am looking to pull in the date for Assessment 2 by client since it's a calc column and each record is client specific - then, I'll figure out the datediff and average.
There's probably a much simpler way of doing this, but I'm getting the following error message with my DAX: Exp refers to multiple columns... mult columns cannot be convered to single value.
Assessment 2 Date =
Solved! Go to Solution.
@samdep , Create a measure like
averageX(summarize(Table, Table[client], "_1", calculate(min(Table[Date]), filter(table, Table[AssessmentName] = "Assessment1" )), "_2", calculate(max(Table[Date]), filter(table, Table[AssessmentName] = "Assessment2" ))), datediff([_1],[_2],day))
@samdep , Create a measure like
averageX(summarize(Table, Table[client], "_1", calculate(min(Table[Date]), filter(table, Table[AssessmentName] = "Assessment1" )), "_2", calculate(max(Table[Date]), filter(table, Table[AssessmentName] = "Assessment2" ))), datediff([_1],[_2],day))
@amitchandak thank you so much! this worked perfectly - so much better than multiple calc columns. thank you!
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 |
---|---|
46 | |
22 | |
20 | |
15 | |
13 |
User | Count |
---|---|
49 | |
41 | |
39 | |
19 | |
19 |