Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
x, y, z are three different fields/columns with values x1, x2...; y1, y2...; and so on.
in case of x we just know "x1" and we need to find x2, x3, x4... in following manner:
x2= x1+y1-z1
x3= x2+y2-z2
and so on
all y and z field values are given but in case of x we just know x1.
How can we apply this in Dax to find x2, x3,....?
Solved! Go to Solution.
Hi @Anonymous
i assume that you have a unique date or index column. Otherwise you nee to create one.
X =
VAR X1 = 1 --inset the initial value
VAR CurrentIndex = TablName[Index]
VAR TableBefore =
FILTER ( TablName, TablName[Index] < CurrentIndex )
VAR Y =
SUMX ( TableBefore, TablName[Y] )
VAR Z =
SUMX ( TableBefore, TablName[Z] )
RETURN
X1 + Y - Z
x, y, z are three different fields/columns with values x1, x2...; y1, y2...; and so on.
in case of x we just know "x1" and we need to find x2, x3, x4... in following manner:
x2= x1+y1-z1
x3= x2+y2-z2
and so on
all y and z field values are given but in case of x we just know x1.
How can we apply this in Dax to find x2, x3,....?
@Anonymous
I peovided my answer here https://community.powerbi.com/t5/DAX-Commands-and-Tips/Can-anybody-help-me-implement-this-logic-in-DAX-We-are-using/m-p/2627761#M76741
Hi @Anonymous
i assume that you have a unique date or index column. Otherwise you nee to create one.
X =
VAR X1 = 1 --inset the initial value
VAR CurrentIndex = TablName[Index]
VAR TableBefore =
FILTER ( TablName, TablName[Index] < CurrentIndex )
VAR Y =
SUMX ( TableBefore, TablName[Y] )
VAR Z =
SUMX ( TableBefore, TablName[Z] )
RETURN
X1 + Y - Z
How would these work if you can explain me?
SUMX ( TableBefore, TablName[Y] )
SUMX ( TableBefore, TablName[Z] )
Hi @Anonymous
Simple mathmatics
x2= x1+y1-z1
x3= x2+y2-z2 = x1+y1-z1+y2-z2 = x1 + (y1+y2) - (z1+z2) = x1 + SUMX (Y) - SUMX (Z)
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 |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |