Forum Discussion
govi
Helper II
5 years agoMeasure to find first & second instance
Hi, I have a problem. I have a table with four columns: DataTime | userId | Question | Answer The question "What is your weight?" is asked (and answered) about 7 times per userId. I have t...
- 5 years ago
The ranking should take into account user and the question so a column would look like this:
RankCol = VAR _user = TableQ[userId] VAR _question = TableQ[question] RETURN RANKX( FILTER (TableQ, TableQ[userId] = _user && TableQ[question] = _question ), TableQ[DateTime],, ASC, Dense)swap in your table name.
amitchandak
Super User
5 years agogovi , Create this new column Rank and filter for 1,2
rankx(filter(Table, [userId] = earlier([userId])), [DataTime],,asc,dense)
For Rank Refer these links
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