March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch 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] ) ) )
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
134 | |
91 | |
89 | |
64 | |
58 |
User | Count |
---|---|
201 | |
137 | |
107 | |
72 | |
68 |