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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Anonymous
Not applicable

Loosing key (link) after groupby

Hi, I have a table that is linked to another table through a key, and now I need to do some grouping in the first table to do some later visualization. However, after I do the groupby, the key is no longer included in the table and it became disconnected from the rest of tables. What should I do to keep the key (link) while grouping without the key...? 

4 REPLIES 4
Greg_Deckler
Super User
Super User

You either need to include the Key column in the GROUPBY group area or include it in the columns area like:

 

GROUPBY(

  'Table',

  [Some column],

  [Key],

  "Some aggregation",SUMX(CURRENTGROUP(),[Column])

)

 

or

 

GROUPBY(

  'Table',

  [Some column],

  "Key",MAXX(CURRENTGROUP(),[Key])

)



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thank you. ... However, where is EARLIER in the codes? And what do you mean by som column and some aggregation?

Oh, never mind about the EARLIER, that's just a joke, it is in my signature.

 

You didn't provide sample data so I wasn't sure what kinds of columns and such I was dealing with so I just used place holders.

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks. I found a way to circumvent the problem... but I dont have a solution to the problem yet. Let me prepare the dataset and edit the question later...

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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