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! Learn more

Reply
Anonymous
Not applicable

Create a new column/measure based on filter conditions

Hi, 

 

As seen from the below table, I need to create a new column with name of the bank which is lead bank.

 

As in the example, Client Tata has multiple ID's and for each ID there are multiple Banks. Need to create a new column where bank name is only where is_lead = Yes.

 

I tried using ALL, ALLSELECTED and Filter condition, but unable to get the desired reult.

 

amitdarak_0-1631635000784.png

 

Regards,

Amit Darak

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , Try a new column like

 

lead bank = maxx(filter(Table, [Client] = earlier([Client]) && [Is Lead] = "Yes"),[Bank])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

sevenhills
Super User
Super User

@amitchandak provided you the skeleton of the syntax.

 

Full column DAX is

Lead Bank Column = MAXX( FILTER(Table1, Table1[Client Name] = EARLIER(Table1[Client Name]) &&  Table1[ID] = EARLIER(Table1[ID]) && Table1[Is Lead] = "Yes"), Table1[Bank Name])

 

View solution in original post

5 REPLIES 5
sevenhills
Super User
Super User

It seems to be a new problem and frankly speaking you should open new thread. 

 

Below syntax is for new calculated column "Value"

 

 

Value = IF( MAXX(FILTER(LeadBank, LeadBank[ID] = EARLIER(LeadBank[ID])), LeadBank[Amt]) = "0","Match", "No Match") 

 

 

Other ways do exists like summarize, group by ... 

 

Bettery way is to have a sum column and then it helps rendering other visualizations

 
Sum Value = CALCULATE( Sum ( LeadBank[Amount]), FILTER(LeadBank, LeadBank[ID] = EARLIER(LeadBank[ID]) && LeadBank[Client Name] = EARLIER(LeadBank[Client Name])))
Anonymous
Not applicable

I tried above logic for another case but it does not give the appropriate result.

 

As seen in the image below, for 1 single ID if all values are 0, then value should be "Match" and if there is any non zero amt for ID then value should be Unmatch.

 

amitdarak_0-1638457163373.png

value = MAXX(FILTER('data',
'data'[ID] = EARLIER(data'[ID]) &&
'data'[Amt] = 0),"Match")
 
How do I modify my DAX for the above part?
sevenhills
Super User
Super User

@amitchandak provided you the skeleton of the syntax.

 

Full column DAX is

Lead Bank Column = MAXX( FILTER(Table1, Table1[Client Name] = EARLIER(Table1[Client Name]) &&  Table1[ID] = EARLIER(Table1[ID]) && Table1[Is Lead] = "Yes"), Table1[Bank Name])

 

amitchandak
Super User
Super User

@Anonymous , Try a new column like

 

lead bank = maxx(filter(Table, [Client] = earlier([Client]) && [Is Lead] = "Yes"),[Bank])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi,

 

This one worked. Thank you.

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