Forum Discussion
IAM
4 years agoHelper III
Solution without extra columns?
Hi all, Hope you can help me design something without adding extra columns. I want to see the average days between 3 different statuses per employee. Between date creation -> planned -> act...
- 4 years ago
Hi IAM ,
We assum data looks like this:
create a measure to calculate the average days.
Measure = VAR _s1 = "creation" VAR _s2 = "planned" VAR _s3 = "actual" VAR _s1_s2 = VALUE ( CALCULATE ( MAX ( 'Table'[start date] ), FILTER ( ALLSELECTED ( 'Table'[status] ), [status] = _s2 ) ) - CALCULATE ( MAX ( 'Table'[start date] ), FILTER ( ALLSELECTED ( 'Table'[status] ), [status] = _s1 ) ) ) VAR _s2_s3 = VALUE ( CALCULATE ( MAX ( 'Table'[start date] ), FILTER ( ALLSELECTED ( 'Table'[status] ), [status] = _s3 ) ) - CALCULATE ( MAX ( 'Table'[start date] ), FILTER ( ALLSELECTED ( 'Table'[status] ), [status] = _s2 ) ) ) RETURN DIVIDE ( _s1_s2 + _s2_s3, 2 )Pbix file in the end and hope this helpful.
Best Regards
Community Support Team _ chenwu zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
lbendlin
4 years agoSuper User
Please provide sanitized sample data that fully covers your issue. If you paste the data into a table in your post or use one of the file services it will be easier to assist you. Avoid posting screenshots of your source data if possible.
Please show the expected outcome based on the sample data you provided. Screenshots of the expected outcome are ok.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523