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

Add grouping using DAX

Hi all,

I have columns:

 

Store name

Coleague name

Sales

 

And want to create table that includes only:

 

Colleague name

total sales for Store

 

I don't want to add extra column for Store name and then use allexcept etc.

 

Just want to add grouping/filter using DAX so the result will be as above. It is important to use DAX and not add any extra columns.

 

thanks

 

daniel

1 ACCEPTED SOLUTION
JohanT
Frequent Visitor

Hi @Anonymous 

I would use the SUMMARIZE() function to create the table and the SUM() for calculating the sales:

 

In SUMMARIZE you chose what to group by and then create the measure which we name -> "Sales" and define it by SUM()

 

Hope this is what youre looking for

image.png

View solution in original post

6 REPLIES 6
V-lianl-msft
Community Support
Community Support

Hi @Anonymous ,

See if this will meet your requirements
test_0110.PNG
You can refer to the pbix.
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi,

I have managed to do this very similar way already. As per my post earlier.

 

Thanks for reply anyway and have a good day

 

daniel

Hi @Anonymous ,
 
It's glad that you have solved your problem.
You can share the link and accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.
 
Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
JohanT
Frequent Visitor

Hi @Anonymous 

I would use the SUMMARIZE() function to create the table and the SUM() for calculating the sales:

 

In SUMMARIZE you chose what to group by and then create the measure which we name -> "Sales" and define it by SUM()

 

Hope this is what youre looking for

image.png

Anonymous
Not applicable

Hi,

just managed to do this by linking summarized table (grouped by store) to colleague table (store name to store name).

Now when you run it by calleague it will pull total store's sales from summarized table.

 

Much appreciated

 

daniel

Anonymous
Not applicable

Hi,

thanks for reply!

This is close to what i want to achive:

The result I am looking for is as below:

 

Jane 30 (total sales for store A - where Jane works)

Jane 160 (total sales for store B - where Jane works)

John 30 (total sales for store A - where John works)

John 160 (total sales for store B - where John works)

John 10 (as he is the only one employe in store C)

John 20 (as he is the only one employe in store D)

 

much appreciated

 

daniel

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.