Forum Discussion
PowerBI87
6 years agoFrequent Visitor
Column to Calculate Year
Hi, Can i please get help to write a function that will output the column in the right? Company Product Year Output ABC Corp A 2017 First Year GHY Corp A 2018 First Year ...
- 6 years ago
Hi PowerBI87
try to create column
Output = var r = RANKX(FILTER(ALL('Table'), 'Table'[Company] = EARLIER('Table'[Company]) && 'Table'[Product] = EARLIER('Table'[Product])), 'Table'[Year], , ASC) var textRank = SWITCH(r, 1, "First", 2, "Second", 3, "Third", BLANK()) RETURN textRank & " Year"Q
collinq
Super User
6 years agoHi PowerBI87 ,
To help out I would have to understand how the output is being determined. It is obviously not the Year = Output so what are the variables you are trying to use?