Forum Discussion
Shifting values from multiple rows to one row for Unique ID...
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
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!
- parry2k6 years ago
Super User
Anonymous hmmm, I think you should be a calculation to tag Stage 1 or 2 or 3..., it is like category with stage 1, 2, 3 values in it based on your rank