The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi all,
I hope someone can help me by suggesting DAX formula for this scenario. I have this column in Excel that I need to replicate in PowerBI
Any idea how this can be achieved?Thanks in advance for your help.
Solved! Go to Solution.
@Anonymous , You need some kind of index on the tabled, based that we can get max index and do the operation
Power Query- Index Column: https://youtu.be/NS4esnCDqVw
But across to means you have sum all column (DAX example)
new column =
var _max(Table[Index])
Var _secondLast = sumc(filter(Table, Table[index] = _max -1 ), [Col1]+[Col2]+[col3])
Var _Last = sumc(filter(Table, Table[index] = _max ), [col3])
Var _ThirdLast = sumc(filter(Table, Table[index] = _max ), [col3])
return
_ThirdLast + _secondLast -_Last
@Anonymous , You need some kind of index on the tabled, based that we can get max index and do the operation
Power Query- Index Column: https://youtu.be/NS4esnCDqVw
But across to means you have sum all column (DAX example)
new column =
var _max(Table[Index])
Var _secondLast = sumc(filter(Table, Table[index] = _max -1 ), [Col1]+[Col2]+[col3])
Var _Last = sumc(filter(Table, Table[index] = _max ), [col3])
Var _ThirdLast = sumc(filter(Table, Table[index] = _max ), [col3])
return
_ThirdLast + _secondLast -_Last
I was able to figure it out using your formula,thank you a lot!🤗
User | Count |
---|---|
28 | |
12 | |
8 | |
7 | |
5 |
User | Count |
---|---|
35 | |
14 | |
12 | |
9 | |
7 |