Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The FabCon + SQLCon recap series starts April 14th at 8am Pacific. If you’re tracking where AI is going inside Fabric, this first session is a can't miss. Register now

Reply
IAM
Helper III
Helper 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 -> actual

 

On the X should be name of employee, no problem.

 

But the Y..

Date created is the basis, so always 0

 

The other two should be the difference between created and planned

And planned and finish.

 

What is the best way to do this? A way that I can still drill through. Do I need to make an extra column, or measure, or can I build this directly in a chart?

 

Thanks!

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @IAM ,

 

We assum data looks like this:

vchenwuzmsft_0-1652345373255.png

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.

View solution in original post

4 REPLIES 4
v-chenwuz-msft
Community Support
Community Support

Hi @IAM ,

 

We assum data looks like this:

vchenwuzmsft_0-1652345373255.png

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.

danextian
Super User
Super User

Hi @IAM ,

It is difficult to imagine what you're trying to achieve without a sample data.  Please also post your expected or if you were to do it in Excel, what would your formula be?





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
IAM
Helper III
Helper III

Hi, thanks I know, the thing is I don't have anything yet, I'm just mapping out how I want to design something.

 

 

lbendlin
Super User
Super 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

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.