Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
I have data as shown above the first column is the unique identifier. There are two column after that which are dates. For each date there is a significance values. So, this is what I want to achieve:
if the significance has not changed over the last period, then it should say "no change" per unique identifier.
if the significance has changed over the last period, then it should say "change" per unique identifier.
Keep in mind there are two dates so far, but we are planning to bring in many dates. There needs to be comparion dates over dates.
I hope this makes sense. Please let me know if you have questions.
Thank you
Solved! Go to Solution.
Hi @rschaudhr ,
Firstly, I think your table should look like as below.
If your table looks like as below, I suggest you to try UNPIVOT function to transform your table.
Then create a measure and show result in matrix column subtotal field.
Whether change in last period =
VAR _LASTDATE =
MAXX ( ALLEXCEPT ( 'Table', 'Table'[Unique Reference] ), 'Table'[Date] )
VAR _PREDATE =
MAXX (
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Unique Reference] ),
'Table'[Date] < _LASTDATE
),
'Table'[Date]
)
VAR _STATUS1 =
CALCULATE ( MAX ( 'Table'[Status] ), 'Table'[Date] = _LASTDATE )
VAR _STATUS2 =
CALCULATE ( MAX ( 'Table'[Status] ), 'Table'[Date] = _PREDATE )
RETURN
IF (
HASONEVALUE ( 'Table'[Date] ),
MAX ( 'Table'[Status] ),
IF ( _STATUS1 = _STATUS2, "no change", "change" )
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @rschaudhr ,
Firstly, I think your table should look like as below.
If your table looks like as below, I suggest you to try UNPIVOT function to transform your table.
Then create a measure and show result in matrix column subtotal field.
Whether change in last period =
VAR _LASTDATE =
MAXX ( ALLEXCEPT ( 'Table', 'Table'[Unique Reference] ), 'Table'[Date] )
VAR _PREDATE =
MAXX (
FILTER (
ALLEXCEPT ( 'Table', 'Table'[Unique Reference] ),
'Table'[Date] < _LASTDATE
),
'Table'[Date]
)
VAR _STATUS1 =
CALCULATE ( MAX ( 'Table'[Status] ), 'Table'[Date] = _LASTDATE )
VAR _STATUS2 =
CALCULATE ( MAX ( 'Table'[Status] ), 'Table'[Date] = _PREDATE )
RETURN
IF (
HASONEVALUE ( 'Table'[Date] ),
MAX ( 'Table'[Status] ),
IF ( _STATUS1 = _STATUS2, "no change", "change" )
)
Result is as below.
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
User | Count |
---|---|
83 | |
77 | |
71 | |
70 | |
54 |
User | Count |
---|---|
107 | |
99 | |
88 | |
79 | |
67 |