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 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
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the June 2024 Power BI update to learn about new features.
User | Count |
---|---|
93 | |
87 | |
80 | |
69 | |
68 |
User | Count |
---|---|
226 | |
129 | |
119 | |
83 | |
77 |