Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
100 | |
84 | |
76 | |
65 |
User | Count |
---|---|
120 | |
111 | |
94 | |
83 | |
77 |