Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hi,
I'm trying to make something that emulates FIRSTNONBLANKVALUE, but i want it to instead return the nTH value (second, third, fourth...).
I tried a few things but nothing worked right. Is it something that can be done?
(The values are text).
Hi, @AlexGQc , sure thing, as well as 3rd, 4th, 5th ... NONBLANKVALUE alike. You might want to try this pattern,
Nth_NONBLANKVALUE =
LASTNONBLANKVALUE (
TOPN ( n, ... ),
1
)
| Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Of course, it's possible. With DAX almost anything is possible, bar some recurrent formulae that can't be expressed in a closed form.
To do this, however, you have to create it straight in the model, so it'll be specific to it. You can't create something that will be a general function like FIRSTNONBLANKVALUE. There is no way to define general formulae that would work similarly to the native DAX functions.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 5 | |
| 4 | |
| 3 | |
| 3 |
| User | Count |
|---|---|
| 24 | |
| 12 | |
| 11 | |
| 9 | |
| 8 |