Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Plugging Row Value Into Measure Added Column

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

2 REPLIES 2
Anonymous
Not applicable

@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

DataZoe
Microsoft Employee
Microsoft Employee

@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/

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors