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
Hi Team,
Newbie here,
Is there any way to convert the below CALCULATED COLUMN to MEASURE
This will help me to make the formula dynamically.
Thank you so much!
Solved! Go to Solution.
Hi @Anonymous ,
The column dax you used:
AVGACC1 =
VAR _1 =
MINX (
FILTER (
'ERI RAW',
'ERI RAW'[Account] = EARLIER ( 'ERI RAW'[Account] )
&& 'ERI RAW'[Attribute] = EARLIER ( 'ERI RAW'[Attribute] )
),
'ERI RAW'[Index]
)
VAR _2 =
MINX (
FILTER (
'ERI RAW',
'ERI RAW'[Account] = EARLIER ( 'ERI RAW'[Account] )
&& 'ERI RAW'[Attribute] = EARLIER ( 'ERI RAW'[Attribute] )
),
'ERI RAW'[Seconds]
)
RETURN
IF ( 'ERI RAW'[Index] = _1, _2, BLANK () )
Then turn to the below measure:
AVGACC2 =
VAR _1 =
CALCULATE(MIN('ERI RAW'[Index]),
FILTER (
ALL('ERI RAW'),
'ERI RAW'[Account] =MAX ( 'ERI RAW'[Account] )
&& 'ERI RAW'[Attribute] = MAX( 'ERI RAW'[Attribute] )
)
)VAR _2 =
CALCULATE(MIN('ERI RAW'[Seconds]),
FILTER (
ALL('ERI RAW'),
'ERI RAW'[Account] =MAX ( 'ERI RAW'[Account] )
&& 'ERI RAW'[Attribute] = MAX( 'ERI RAW'[Attribute] )
)
)
RETURN
IF(MAX('ERI RAW'[Index])=_1,_2,BLANK())
Compare result:
Wish it is helpful for you!
Best Regards
Lucien
Hi @Anonymous ,
The column dax you used:
AVGACC1 =
VAR _1 =
MINX (
FILTER (
'ERI RAW',
'ERI RAW'[Account] = EARLIER ( 'ERI RAW'[Account] )
&& 'ERI RAW'[Attribute] = EARLIER ( 'ERI RAW'[Attribute] )
),
'ERI RAW'[Index]
)
VAR _2 =
MINX (
FILTER (
'ERI RAW',
'ERI RAW'[Account] = EARLIER ( 'ERI RAW'[Account] )
&& 'ERI RAW'[Attribute] = EARLIER ( 'ERI RAW'[Attribute] )
),
'ERI RAW'[Seconds]
)
RETURN
IF ( 'ERI RAW'[Index] = _1, _2, BLANK () )
Then turn to the below measure:
AVGACC2 =
VAR _1 =
CALCULATE(MIN('ERI RAW'[Index]),
FILTER (
ALL('ERI RAW'),
'ERI RAW'[Account] =MAX ( 'ERI RAW'[Account] )
&& 'ERI RAW'[Attribute] = MAX( 'ERI RAW'[Attribute] )
)
)VAR _2 =
CALCULATE(MIN('ERI RAW'[Seconds]),
FILTER (
ALL('ERI RAW'),
'ERI RAW'[Account] =MAX ( 'ERI RAW'[Account] )
&& 'ERI RAW'[Attribute] = MAX( 'ERI RAW'[Attribute] )
)
)
RETURN
IF(MAX('ERI RAW'[Index])=_1,_2,BLANK())
Compare result:
Wish it is helpful for you!
Best Regards
Lucien
what are you trying to achieve, can you explain your requirements?
Proud to be a Super User!
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.