Forum Discussion
Dynamic X Axis based on Slicer using Dynamic table or RANKX
Thank you for your help on the Dynamic table.
As I am new I need guidance on using the RANKX function to add the index column.
Reg. Power Query to sort the sprints by Date:
There are multiple rows (all work items) with the same sprint start date and Sprint Name as they all belong to the same Sprint, so adding an Index after sorting Start Date or Start Date + SprintName will not work. So the Index/Rank should rank all Work items/rows belonging to a Single Sprint with one number .
So the data should have Index like below:
Thanks,
Prabhat
Try
Sprint index =
RANKX (
ALL ( 'Table'[Sprint], 'Table'[Start date] ),
'Table'[Start date],
,
ASC
)
- prabhatnath3 years agoAdvocate III
Thank you for the RANKX and it is doing exactly what I was looking for.
Once this Index is added I tried your virtual table code as below but unfortunately, the table value is not getting updated based on the Sprint Slicer selection. Below is the Screenshot for your reference.If the user selects "Sprint 2404" then the chart should show data for Sprint 2404 + Sprint 2403 + Sprint 2402. This means the new table should have Sprint Values: 2404, 2403, and 2402.
If the user selects "Sprint 2403" then the chart should show data for Sprint 2403 + Sprint 2402 + Sprint 2401. And here the new table should have Sprint Values: 2403, 2402 and 2401.
I think we should fill the new Dynamic Table with:
Sprint Name that was selected by the user in the Slicer +
Append Sprint Name from the Sprint table that has Index - 1 of the Selected Sprint Index.
Append Sprint Name from the Sprint table that has Index - 2 of the Selected Sprint Index.
This is just my thought but not sure of that is possible. This will ensure the Dynamic table has updated Sprint values based on Slicer Selection and can be used as X Axis.Thanks,
Prabhat
Velocity Sprints = SELECTCOLUMNS( GENERATE( SUMMARIZE( 'Sheet1', 'Sheet1'[Sprint Name], 'Sheet1'[Sprint Index]), VAR CurrentIndex = 'Sheet1'[Sprint Index] RETURN GENERATESERIES( MAX( CurrentIndex - 2, 1), CurrentIndex) ), "Sprint", 'Sheet1'[Sprint Name], "Sprint number", [Value] )- johnt753 years agoSuper User
You need a relationship from the new table to the existing one. You should use the column from the new table in the slicer and the columns from the existing table in the other visuals
- prabhatnath3 years agoAdvocate III
I forgot to have the relationship set up. I Tried but got the below error while setting the relation. Similar error for any Cardinality I select. I am not an expert so might be making mistakes.
Also, I was thinking we should fill the new Dynamic Table with:
Sprint Name that was selected by the user in the Slicer +
Append Sprint Name from the Sprint table that has Index - 1 of the Selected Sprint Index.
Append Sprint Name from the Sprint table that has Index - 2 of the Selected Sprint Index.
and then setup the relationship. This will ensure the Dynamic table has updated Sprint values based on Slicer Selection and can be used as X Axis.
Thanks,Prabhat