Forum Discussion
powerbiexpert22
Impactful Individual
1 year agoexpected value
i am using two columns yearmonth and value in table visual as shown below, i need third column "expected_output" in same table as highlighted below , this third column should pick up the first non ...
- 1 year ago
This dax code should work
expected_output = VAR temp = TOPN ( 1, FILTER ( Sheet1, Sheet1[yearmonth] >= EARLIER ( Sheet1[yearmonth] ) && Sheet1[value] <> 0 ), Sheet1[yearmonth], ASC ) VAR result = MINX ( temp, Sheet1[value] ) RETURN result
powerbiexpert22
Impactful Individual
1 year agoHi kushanNa ,
it should be in DAX
kushanNa
Super User
1 year ago
This dax code should work
expected_output =
VAR temp =
TOPN (
1,
FILTER (
Sheet1,
Sheet1[yearmonth] >= EARLIER ( Sheet1[yearmonth] ) &&
Sheet1[value] <> 0
),
Sheet1[yearmonth], ASC
)
VAR result =
MINX ( temp, Sheet1[value] )
RETURN
result