cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Udt_KV
Post Partisan
Post Partisan

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
V-pazhen-msft
Community Support
Community Support

@Udt_KV 
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 III
Super User III

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/

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
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors