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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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

@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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.