Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I need to do this formula in a DAX table:
1- First row = A * B
2- Second Row until the end = B * E (result of row before)
Can I do it in dax?
Solved! Go to Solution.
Hi @Anonymous
I didn't have the chance to test it so please do from your end
Value =
VAR T1 =
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[Key AP] ) )
VAR Index1 =
MINX ( T1, 'Table'[Index] )
VAR Value1 =
MAXX (
FILTER ( T1, 'Table'[Index] = Index1 ),
'Table'[Valor] * ( 'Table'[INCC-M. Valor] + 1 )
)
VAR T2 =
FILTER (
T1,
'Table'[Index] <= EARLIER ( 'Table'[Index] )
&& 'Table'[Index] > Index1
)
VAR ProductValue =
PRODUCTX ( T2, 'Table'[INCC-M. Valor] + 1 )
RETURN
Value1 * COALESCE ( ProductValue, 1 )
Hi @Anonymous
I didn't have the chance to test it so please do from your end
Value =
VAR T1 =
CALCULATETABLE ( 'Table', ALLEXCEPT ( 'Table', 'Table'[Key AP] ) )
VAR Index1 =
MINX ( T1, 'Table'[Index] )
VAR Value1 =
MAXX (
FILTER ( T1, 'Table'[Index] = Index1 ),
'Table'[Valor] * ( 'Table'[INCC-M. Valor] + 1 )
)
VAR T2 =
FILTER (
T1,
'Table'[Index] <= EARLIER ( 'Table'[Index] )
&& 'Table'[Index] > Index1
)
VAR ProductValue =
PRODUCTX ( T2, 'Table'[INCC-M. Valor] + 1 )
RETURN
Value1 * COALESCE ( ProductValue, 1 )
switch(
true(),
index =3 , ( [column A] * [Column B] )+ [Column A],
index >=4, ([column E] * [Column B] ) +[Column E]
)
@Anonymous the problem is: [Column E] in power BI is the calculated column. I can't use it in this formula.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
22 | |
7 | |
6 | |
6 | |
6 |
User | Count |
---|---|
27 | |
10 | |
10 | |
9 | |
6 |