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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

GroupBy keeping a column not participating in defining unique combination

From a table containing multiple contacts per account and information about telemarketing, i need to produce a status at an account level. The following DAX formula will successfully produce a table of unique accounts and a maximum index per account. But I need to display the status name also, if I add table[status] as a column in GROUPBY, then it would display a combination of accounts and status names, it won't create a list of unique accounts.

 

Account contact status status index 
AXabc1
AYdef2
AZghi3
BXabc1
BYdef2
CXabc1

 

.t_190731_ctasSinCita_abm =
GROUPBY (
    table,
    table[account],
    "max status index", MAXX (
        CURRENTGROUP (),
        table[status index]
    )
)

 

1 REPLY 1
Anonymous
Not applicable

Mate, do you need to create a calculated table out of this? If you do, then do it in Power Query in M, not in DAX. DAX is not a data mashup language. It's a Data Analysis Expressions language.

 

On the other hand, if you want to have a measure that will return the maximum index for an account, then this will do the job:

[Maximum Index] =
var __oneAccountVisible = HASONEVALUE ( T[Account] )
var __maxIndex = MAX ( T[Index] )
return
	if (
		__oneAccountVisible,
		__maxIndex
	)

And if you want to have a measure that'll return the status for the [Maximum Index], then:

[Maximum Status] =
var __maxIndex = [Maximum Index]
var __maxStatus =
	calculate (
		values ( T[status] ),
		T[status index] = __maxIndex
	)
return
	__maxStatus

Best

D.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.