Forum Discussion
Shifting values from multiple rows to one row for Unique ID...
Anonymous you should add another column for stage and then it should be easy
Stage =
SWITCH ( Table[Old Value],
"Prospecting", "Stage 1",
"Qualifying", "State 2",
"Estimating", "Stage 3",
"Proposing", "Stage 4",
"Stage 5"
)
and use this new column on columns in the matrix visual
I would ❤ Kudos if my solution helped. 👉 If you can spend time posting the question, you can also make efforts to give Kudos whoever helped to solve your problem. It is a token of appreciation!
Not sure that would work due to our lack of restriction. Unfortunately, our Salesforce team hasn't locked down starting positions, at least not until recently. So a salesperson could enter an opportunity in the estimating stage and that would technically be Stage 1. And then from there it moves to Proposing (or wherever) which would be Stage 2 for that opportunity.
Weird, I know.
- parry2k6 years ago
Super User
Anonymous I guess then you need to rank the status and then based on the rank, set the stage
read more about ranking here.
https://radacad.com/how-to-use-rankx-in-dax-part-1-of-3-calculated-columns
https://radacad.com/how-to-use-rankx-in-dax-part-2-of-3-calculated-measures
https://radacad.com/how-to-use-rankx-in-dax-part-3-of-3-the-finale- Anonymous6 years agoNot applicable
parry2k I took a brief shot at this using Rank.EQ, but not RankX. Will try with RankX and see if it works out.
When I attempted to to flatten out the stages using if statements referring to the Rank.EQ results, it created a separate row at Stage3 (i think due to the criteria)... will see how this goes.
Either way, I appreciate all the suggestions!
Thanks,
John
- Anonymous6 years agoNot applicable
parry2k so i got the rank down, but now producing the columns so they show in one singular row appears to be an issue. I'm using an IF statement to grab each stage and the rank is based on the date the stage changed:
Stage1 = if( [StageRank] = 1, [OldValue])
Stage2 = if( [StageRank] = 1, [NewValue])
Stage3 = if( [StageRank] = 2, [OldValue])
It results in the following
OppID Rank Stage1 Stage2 Stage3 ABC123 1 Prospecting Qualifying ABC123 2 Estimating Even when i remove the rank field from the table visual it still displays like the above. Any ideas as to how to get everything on the same row? Should I use something besides an IF statement?
Thanks!