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
robandemmy
Frequent Visitor

Matrix Summing Totals

Hello,

 

I am having trouble getting a visualization to work properly. I have two tables (approved and spent) that each have "project number" rows and "task" columns. Can use the matrix visual fine for one table but when I try to add the second, it sums the values instead of showing vaules for each task:

 

Approved column showing total instead of individual valuesApproved column showing total instead of individual values

Am I doing something wrong, or is what I am attempting not possible? I can combine these table in excel and pivot them but they're large and annoying to do so.

 

Thanks,

Rob

1 ACCEPTED SOLUTION


@robandemmy  OK so now you have a many-to-many which tends to be a bad thing. Generally, to fix this and make it work correctly, you need to create a bridge table like:

 

Table = DISTINCT('PCSData'[Task])

 

You relate this to both of your tables and use the Task column in this bridge table in your visualizations.



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...

View solution in original post

6 REPLIES 6
Syndicate_Admin
Administrator
Administrator

So I did some progess:

Power BI Matrix 2.PNGNow displays the total of all actual ITD data, not those related to tasks 001 and 002Power BI Relationship.PNGThis is the relationship

You are picking up the ratio 001/002 (task), but not the 407_ (project number)

robandemmy
Frequent Visitor

So I madesome progess:

 

Now shows total for all ITD Actuals, not the ones related to the 001 and 002 tasksNow shows total for all ITD Actuals, not the ones related to the 001 and 002 tasksThis is the relationshipThis is the relationship

It's picking up the 001/002 (task) relation but not the 407_ (project number)


@robandemmy  OK so now you have a many-to-many which tends to be a bad thing. Generally, to fix this and make it work correctly, you need to create a bridge table like:

 

Table = DISTINCT('PCSData'[Task])

 

You relate this to both of your tables and use the Task column in this bridge table in your visualizations.



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...
amitchandak
Super User
Super User

@robandemmy , seem like you using if in some calculation if so use the filter

 

Or try to have calculation like this

sumx(summarize(Table, Table[project Number],Table[project line],"_1",[measure]),[_1])

//Group by which I add are the rows in you matrix, can not see the all name

Greg_Deckler
Super User
Super User

Generally when you see things like that their is a bad or missing relationship between 2 tables.


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...
parry2k
Super User
Super User

@robandemmy not sure how the relationship is set up between these tables, the recommendation would be to have separate project and task table and have a relationship with both these tables and then use these new dimension tables in the matrix visuals.

 

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 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.