Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
I have a data set that shows ranking by website domain over time like this
I would like to create a measure that calculates the ranking movement by period like this
Any help with the dax is appreciated.
Solved! Go to Solution.
Hi @GWoodhouse ,
Here are the steps you can follow:
1. Select the columns for all dates – Transform – Unpiovt Columns.
2. Select [Attribute] – Change Type – Date/Time
3. Create measure.
*/- =
var _date=
MAXX(
FILTER(ALL('Table'),
'Table'[Domain]=MAX('Table'[Domain])&&'Table'[Attribute]<MAX('Table'[Attribute])),[Attribute])
var _value=
SUMX(
FILTER(ALL('Table'),
'Table'[Domain]=MAX('Table'[Domain])&&'Table'[Attribute]=_date),[Value])
return
IF(
_date=BLANK(),
0,
_value - MAX('Table'[Value]))
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
Hi @GWoodhouse ,
Here are the steps you can follow:
1. Select the columns for all dates – Transform – Unpiovt Columns.
2. Select [Attribute] – Change Type – Date/Time
3. Create measure.
*/- =
var _date=
MAXX(
FILTER(ALL('Table'),
'Table'[Domain]=MAX('Table'[Domain])&&'Table'[Attribute]<MAX('Table'[Attribute])),[Attribute])
var _value=
SUMX(
FILTER(ALL('Table'),
'Table'[Domain]=MAX('Table'[Domain])&&'Table'[Attribute]=_date),[Value])
return
IF(
_date=BLANK(),
0,
_value - MAX('Table'[Value]))
4. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly