Forum Discussion
Anonymous
8 years agoNot applicable
Latest Value
Hi Guys, I need some help on this. Here's my data: Date Store Product Answer 16/07/2018 McDonald Pizza Yes 17/07/2018 McDonald Pizza No 16/07/2018 McDonald Burger No 1...
- 8 years ago
- 8 years ago
Anonymous
As a NEW Table ("Calculated Table"), you can use
New Table = VAR temp = ADDCOLUMNS ( Table1, "RANK", RANKX ( FILTER ( Table1, [Store] = EARLIER ( [Store] ) ), [Date],, DESC, DENSE ) ) RETURN FILTER ( temp, [RANK] = 1 )
Anonymous
8 years agoNot applicable
Hi Ashish,
Can you please let me know the syntax for producing the below new table in DAX?
Using this feature:
| Date | Store | Product | Answer |
| 17/07/2018 | McDonald | Pizza | No |
| 17/07/2018 | McDonald | Burger | No |
| 17/07/2018 | KFC | Pizza | Yes |
| 17/07/2018 | KFC | Burger | Yes |
Thank you
Zubair_Muhammad
Community Champion
8 years agoAnonymous
As a NEW Table ("Calculated Table"), you can use
New Table =
VAR temp =
ADDCOLUMNS (
Table1,
"RANK", RANKX ( FILTER ( Table1, [Store] = EARLIER ( [Store] ) ), [Date],, DESC, DENSE )
)
RETURN
FILTER ( temp, [RANK] = 1 )