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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Tripb44
Helper II
Helper II

Summarize multiple columns by group into one column from sales fact table

I am needing to summarize three columns into one as shown below.  What would be the best way to do this.  All three columns are in a sales fact table.

Tripb44_0-1616463521595.png

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi this worked perfect for the initial task.  Question, I am trying to add a date field to group by YearMonth.  All seems to work as expected in the first screenshot below, however, when moving on to the next applied step I encounter all null date values.  Is there a workaround to this?  Thanks again for the great response!


Tripb44_0-1623166902373.png


Tripb44_1-1623166975498.png

 

 

Hi,

The picture is way too small.  I cannot understand anything.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
amitchandak
Super User
Super User

@Tripb44 , Create a common Rep table  and join with three rep column, active join with rep and inactive join with other two and only join in visual using userelationship in measure

 

a new measure =

calculate(sum(Table[rep1$])) +
calculate(sum(Table[rep2]), userelationship(rep[rep], table[Rep2$])) +
calculate(sum(Table[rep3]), userelationship(rep[rep], table[Rep3$]))

 

userelationship -

https://radacad.com/userelationship-or-role-playing-dimension-dealing-with-inactive-relationships-in...

 

common table - https://www.youtube.com/watch?v=Bkf35Roman8

 

Or create new Table

Union(
selectcolumns(Table, "Rep1", Table[rep1], "rep$",Table[rep1$]),
selectcolumns(Table, "Rep1", Table[rep2], "rep$",Table[rep1$]),
selectcolumns(Table, "Rep1", Table[rep3], "rep$",Table[rep1$])
)

 

 

Or create new Table
Union(
summarize(Table, Table[rep1], "rep$",sum(Table[rep1$])),
summarize(Table, Table[rep2], "rep$",sum(Table[rep1$])),
summarize(Table, Table[rep3], "rep$",sum(Table[rep1$]))
)

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

For the union, if I need to add the order date as well how would that look for the dax?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors