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! Request now
I am trying to find the first time one Measure has a lower value then a second measure (each measures only takes in Integers). The way I thought of doing it was creating a table of integers and then just calculating each table with a filter at that value. But I keep getting an Error. How do I take the current value from the generateseries current row and plug it into a filter?
Here is my Dax (Ignore the Return, I'm just working on the Variables right now).
Test =
VAR _n = 180
VAR _CutDay = 0
VAR Main = [Main - DSA]
VAR _Table1 =
GENERATESERIES ( 0, _n )
VAR _Table2 =
ADDCOLUMNS (
_Table1,
"MainPer",
CALCULATE (
[MainRate],
DaysSinceAssigned[DaysSinceAssigned] = Main
)
- CALCULATE (
[MainRate],
DaysSinceAssigned[DaysSinceAssigned] = Main - [Value]
)
)
VAR _Table3 =
ADDCOLUMNS (
_Table2,
"SecPer", CALCULATE ( [SecondRate], DaysSinceAssigned[DaysSinceAssigned] = [Value] )
)
RETURN
2
@Anonymous
Do you mean you want to find the first row number? But measures are not dynamic. You can convert the measures in to calculate columns. Can you share a short sample of your model, this would help a lot.
Paul Zheng _ Community Support Team
@Anonymous You may consider using FIRSTNONBLANK instead. FIRSTNONBLANK function (DAX) - DAX | Microsoft Docs
First Time Lower =
FIRSTNONBLANK ( table[Date], IF ( [ThisMeasure] < [OtherMeasure], 1, BLANK () ) )
Respectfully,
Zoe Douglas (DataZoe)
Follow me on LinkedIn at https://www.linkedin.com/in/zoedouglas-data
See my reports and blog at https://www.datazoepowerbi.com/
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.