Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hey,
How can I achieve the following in a column in a DAX, this sounds a bit like recursive.
I have a table like following in PowerBI, in which I wish to populate Column B in the following steps:
1. For first row it should have the value as column A
2. For rows after first row:
Row | Column A | Column B |
1 | 1824 | 1824 |
2 | 0 | 1824 |
3 | 24 | 1800 |
4 | 48 | 1752 |
5 |
| 1752 |
6 |
| 1752 |
Any help associated with it is highly appreciated.
Solved! Go to Solution.
Hi @Anonymous ,
To create two calculated column as below.
Column = VAR k = FILTER ( 'Table', 'Table'[Column A] <> BLANK () ) VAR minr = CALCULATE ( MIN ( 'Table'[Row] ), ALL ( 'Table' ), KEEPFILTERS ( k ) ) RETURN IF ( 'Table'[Row] = minr, 'Table'[Column A], 0 - 'Table'[Column A] )
new column B = CALCULATE ( SUM ( 'Table'[Column] ), FILTER ( 'Table', 'Table'[Row] <= EARLIER ( 'Table'[Row] ) ) )
Hi @Anonymous ,
To create two calculated column as below.
Column = VAR k = FILTER ( 'Table', 'Table'[Column A] <> BLANK () ) VAR minr = CALCULATE ( MIN ( 'Table'[Row] ), ALL ( 'Table' ), KEEPFILTERS ( k ) ) RETURN IF ( 'Table'[Row] = minr, 'Table'[Column A], 0 - 'Table'[Column A] )
new column B = CALCULATE ( SUM ( 'Table'[Column] ), FILTER ( 'Table', 'Table'[Row] <= EARLIER ( 'Table'[Row] ) ) )
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
73 | |
57 | |
38 | |
35 |
User | Count |
---|---|
83 | |
68 | |
59 | |
46 | |
45 |