Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi, i created a new column named
Solved! Go to Solution.
Hi @Subhash08
Getting the previous row number in Power BI is not as easy as in Excel, but there are multiple ways to achive this, and the following is one example. You can achieve your required output by creating a separate calculated table referencing with staggering index and the value you want to bring in the next row,
Create a relationship between the index calculated table and the data table using the staggered previous row in the calculated table as the reference key.
Then create a measure, concatenateXing the column you want to stagger the rows.
The output like below will be produced.
I attach the pbix as an example. I am sure that there are many other sophisticated ways to achive this, too.
Hi @Subhash08
Thanks for the reply from @DataNinja777 . Here I have another idea in mind, and I would like to share it for reference.
I used a portion of your data and then ran the following test.
Create several calculated columns as follow
Column =
VAR _previous = 'Table'[Sequence]
VAR _maxs = CALCULATE(MAX([Sequence]), FILTER('Table', [New Item No_] <> BLANK() && _previous > [Sequence]))
RETURN
_maxs
nuova colonna new = IF([New Item No_] <> BLANK(), [New Item No_], LOOKUPVALUE('Table'[New Item No_], 'Table'[Sequence], 'Table'[Column]))
Result:
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Subhash08
Thanks for the reply from @DataNinja777 . Here I have another idea in mind, and I would like to share it for reference.
I used a portion of your data and then ran the following test.
Create several calculated columns as follow
Column =
VAR _previous = 'Table'[Sequence]
VAR _maxs = CALCULATE(MAX([Sequence]), FILTER('Table', [New Item No_] <> BLANK() && _previous > [Sequence]))
RETURN
_maxs
nuova colonna new = IF([New Item No_] <> BLANK(), [New Item No_], LOOKUPVALUE('Table'[New Item No_], 'Table'[Sequence], 'Table'[Column]))
Result:
Best Regards,
Yulia Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Subhash08
Getting the previous row number in Power BI is not as easy as in Excel, but there are multiple ways to achive this, and the following is one example. You can achieve your required output by creating a separate calculated table referencing with staggering index and the value you want to bring in the next row,
Create a relationship between the index calculated table and the data table using the staggered previous row in the calculated table as the reference key.
Then create a measure, concatenateXing the column you want to stagger the rows.
The output like below will be produced.
I attach the pbix as an example. I am sure that there are many other sophisticated ways to achive this, too.
User | Count |
---|---|
53 | |
35 | |
20 | |
16 | |
15 |
User | Count |
---|---|
94 | |
76 | |
36 | |
22 | |
18 |