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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
kballar1
Helper I
Helper I

Dax Help Needed Comparison of Results

IMG_1780.jpeg

I have a physical date column and a workflow status column that has several different statuses such as "waiting on approval" etc. 

I need to compare the physical date with the workflow status "Received Pricing" in order to find out how many days are between the two. 

Basically how many days it took to reach the workflow status of "received pricing". Wanting to know how long it took to reach that approval status. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @kballar1 

For your question, try the following:

 

Here's some dummy data

 

“Table”

vnuocmsft_0-1704789237419.png

 

Create a measure

vnuocmsft_1-1704789315609.png

 

Measure = 
    var physical_date = 
        SELECTEDVALUE(
            'Table'[Physical Date]
        )
    var createdon_date = 
        SELECTEDVALUE(
            'Table'[Createdon.date]
        )
RETURN 
    IF(
        SELECTEDVALUE('Table'[Workflow Status]) = "-Received Pricing", 
        DATEDIFF(physical_date, createdon_date, DAY), 
        BLANK()
    )

 

Here is the result

vnuocmsft_2-1704789390815.png

 

Regards,

Nono Chen

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

6 REPLIES 6
Anonymous
Not applicable

Hi @kballar1 

 

For your question about calculating the date interval, here is the method I provided:

 

Here's some dummy data

 

vnuocmsft_0-1704357025433.png

 

Create a measure, query the start date, end date of the workflow, and calculate the date interval.

 

vnuocmsft_1-1704357049966.png

 

 

Date intervals = var start_date = CALCULATE(MAX('Table'[Physical Date]), FILTER(ALL('Table'), 'Table'[Product ID] = MAX('Table'[Product ID]) && 'Table'[Workflow Status] = "-waiting on approval"))

var end_date = CALCULATE(MAX('Table'[Physical Date]), FILTER(ALL('Table'), 'Table'[Product ID] = MAX('Table'[Product ID]) && 'Table'[Workflow Status] = "-Received Pricing"))

RETURN DATEDIFF(start_date, end_date, DAY)

 

 

Here is the result.

 

vnuocmsft_2-1704357130278.png

If you're still having problems, provide some dummy data and the desired outcome. It is best presented in the form of a table.

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

 

Fowmy
Super User
Super User

@kballar1 

Can you share some sample data with the desired output to have a clear understanding of your question?
Mention whether you want a calculated column or measure.
You can either paste your data in the reply box or save it in OneDrive, Google Drive, or any other cloud-sharing platform and share the link here.



Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

IMG_1803.jpeg

I have to create the difference between the physical date and the created on date, using the the "received pricing" status in the workflow status. 

I am needing to know how many days it took to get to that specific status("Received pricing" in the workflow status columns-which has multiple different status types). 

so basically how many days between physical date to created date with the filter "received pricing" in the workflow status column. 

@kballar1 

Without sharing all the columns that are involved in the logic, it's won't possible to come out with a working solution. 

Sharing a dummy Power BI file representing your scenario would be beneficial. You can save the Power BI file on Google Drive or any other cloud storage platform and provide the link here. Kindly ensure that permission is granted to open the file.

Did I answer your question? Mark my post as a solution! and hit thumbs up


Subscribe and learn Power BI from these videos

Website LinkedIn PBI User Group

Anonymous
Not applicable

Hi @kballar1 

For your question, try the following:

 

Here's some dummy data

 

“Table”

vnuocmsft_0-1704789237419.png

 

Create a measure

vnuocmsft_1-1704789315609.png

 

Measure = 
    var physical_date = 
        SELECTEDVALUE(
            'Table'[Physical Date]
        )
    var createdon_date = 
        SELECTEDVALUE(
            'Table'[Createdon.date]
        )
RETURN 
    IF(
        SELECTEDVALUE('Table'[Workflow Status]) = "-Received Pricing", 
        DATEDIFF(physical_date, createdon_date, DAY), 
        BLANK()
    )

 

Here is the result

vnuocmsft_2-1704789390815.png

 

Regards,

Nono Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I am looking at creating a measure. Wanting to know how many days occurred between the start date and the "received pricing" status in the workflow status column 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (3,924)