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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote 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
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.