Forum Discussion
Meneizs
4 years agoFrequent Visitor
Duplicate rows cummulative
I have a dataset that's contains duplicates rows, that i need to maintain for some analysis. My table is something like this: CONT LOTE DATE CONT/LOTE 10009 10126 07/07/2022 10009-10126...
- 4 years ago
Based on your output, it seems you are looking for is Row Number by Group.
Row Number by Group - Static Column = RANKX( Filter('Table', [CONT/LOTE] = Earlier('Table'[CONT/LOTE]) ) , 'Table'[DATE], , ASC, dense)It took me a while to understand, as I was trying to correct the DAX.
Tip: To post sample data, do copy and paste from Excel.
Ashish_Mathur
Super User
4 years agoHi,
This calculated column formula works
=CALCULATE(COUNTROWS(Data),FILTER(Data,Data[CONT]=EARLIER(Data[CONT])&&Data[DATE]<=EARLIER(Data[DATE])))
Hope this helps.