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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
grechill
Helper I
Helper I

Measure to verify status change between dates

Hello!

 

I'm trying to create a calcualted field to verify, if there was a Stage change between report date and previous report date based on opportunity number. Close date is not involved in this measure. Report dates are in the same column.

I have tryed many different options, but till now without any success 😞

 

Data looks like this:

1.PNG

 

In written words it would be so: If between report from t and t-1 was a STAGE change, then give TRUE, else FALSE. 

Main report is linked to second table, which defines stage order and some segmentation, and stage order can be used as a numerical value for calculated field.

 

I do not wish to merge tables, nor pivot the main table, as it would affect other report measures and whole structure.

 

What I would like to see in the end:

2.PNG

 

Or better 1 and 0 instead of True and False. 

 

I attach a sample pbix.

 

Thanks a lot in advance!

1 REPLY 1
Nathaniel_C
Super User
Super User

Hi @grechill ,

Here is my PBIX PBIX FILE , sorry didn't see yours. So, I would note that the True meets the criteria of a change between current date, and the next older date. 
Let me know if you have any questions.

If this solves your issues, please mark it as the solution, so that others can find it easily. Kudos are nice too.
Nathaniel





change.PNG

 

Change =
VAR _curDate = MyTable[Report Date]
VAR _curStage = MyTable[Stage]
VAR _calc =
    CALCULATE (
        IF ( MAX ( MyTable[Stage] ) <> _curStage, "True", "False" ),
        FILTER (
            ALLEXCEPT ( MyTable, MyTable[Opportunity Number] ),
            MyTable[Report Date] < _curDate
        )
    )
RETURN
    _calc

 

 





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

Proud to be a Super User!




Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.