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

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

Reply
Anonymous
Not applicable

Power Query - Matching value

Hi Team,

Power Query syntax :

I need following result for ID 5 only, please help  me.

 

Capture.PNG

Thanks,

KV's

4 REPLIES 4
Anonymous
Not applicable

@Anonymous 
I would recommend you create this column using dax instead power query, which is much simpler.

Weight = IF('Table'[ID]=5, CALCULATE(SUM([Value]),ALLEXCEPT('Table','Table'[Markets]),'Table'[ID]=39))
V-pazhen-msft_0-1619069940250.png

 

 

Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.
Ashish_Mathur
Super User
Super User

Hi,

Why should the answer be 4?  Why not 0.65 or 0.35?  Bother to explain in detail.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @Ashish_Mathur ,

 

ID 5 pick ID 39 value for Weight and it must be match Markets.

thanks,

kV's

Hi,

Try this calculated column formula

Weight = calculate(max(data[value]),filter(data,data[markets]=earlier(data[markets])&&data[id]=39))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
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 Kudoed Authors