Forum Discussion
Help on Missing data fill techniques
- Anonymous2 years ago
Hi gsksarepta ,
Please try to create a new column with below dax formula:
newresult = VAR _step3 = [step3afin] VAR _a = CALCULATE ( MAX ( 'Table'[step4aex] ), FILTER ( 'Table', [step3afin] = _step3 ) ) RETURN _aPlease refer the attached .pbix file.
Best regards,
Community Support Team_Binbin Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
gsksarepta , Try using this method
newresult =
VAR CurrentRow = YourTable[step4aex]
VAR NonEmptyValues =
FILTER(
YourTable,
YourTable[step3afin] = CurrentRow
&& NOT(ISBLANK(YourTable[step4aex]))
)
VAR Result =
IF(
COUNTROWS(NonEmptyValues) > 0,
CALCULATE(
MAXX(NonEmptyValues, NonEmptyValues[step4aex])
),
BLANK()
)
RETURN Result
Please accept as solution and give kudos if it helps
Hi bhanu_gautam Thanks for your time, I tried it on my PowerBI Table view added it as column measure but got this error, do you see any issues with the script or the way I did?
- bhanu_gautam2 years agoSuper User
Try this
newresult =
VAR CurrentRow = YourTable[step4aex]
VAR NonEmptyValues =
VALUES (
FILTER (
YourTable,
YourTable[step3afin] = CurrentRow
&& NOT(ISBLANK(YourTable[step4aex]))
)
)
VAR Result =
IF (
COUNTROWS(NonEmptyValues) > 0,
MAXX(NonEmptyValues, [step4aex]),
BLANK()
)
RETURN
Result- gsksarepta2 years agoHelper II
Hi, tried the new code but got a different error, attached my pbix file on this google drive, would it be possible to take a look and let me know ? Thanks again.
https://drive.google.com/file/d/1gXOXu8-kSHrN_LjLnhlQ2az52wKCsmbT/view?usp=drive_link