Forum Discussion
DAX ,Find Max
- 5 years ago
Nikhil_D , You need to add an index column in power query
https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi
then try Dax formula
output = var _1 = maxx(filter(Table, [pid] = earlier([pid])), [second])
return
if([index] = maxx(filter(Table, [pid] = earlier([pid]) && [second] =_1), [index]) , [second], blank())
Nikhil_D , You need to add an index column in power query
https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi
then try Dax formula
output = var _1 = maxx(filter(Table, [pid] = earlier([pid])), [second])
return
if([index] = maxx(filter(Table, [pid] = earlier([pid]) && [second] =_1), [index]) , [second], blank())
Hi amitchandak ,
Thanks for your answer. I followed u r steps but didn't get solution.
I think I have not explained clearly.
So let me tell u clearly.
I have tabel as below mentioned and I need "Output" Column.
PID Column have Duplicates and I can not remove those duplicates. I need those for another purpose.
What I need is Calcute P_Second based on PID.
If P_Seconds are Unique for PID, I need only one entry in 'Output' column.
If it is not Unique and I need Max Secons in 'output' column.
if PID is Null, I need it Null only.
Thanks