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
ThomasWeppler
Post Prodigy
Post Prodigy

How to only sum up part of a matrix

Hi Power BI community
I have two tabels.

A tabel with all my Main projects (1)

And a tabel with Main projects (1), sub projects (2) and connected projects (3)
These two tabels are liked together so all projects, sub projects and connected projects can be show as just projects when I drill up.

However as I drill down in the matrix I need to write some DAX that allows me to see Main projects and subprojects as one  and to see each other projects for themselves. However this must not change the results I see when I drill all the way up and only see the summarized main project.

problem.png

 

I hope this make sense and all help is truely appreciated.

1 ACCEPTED SOLUTION
ThomasWeppler
Post Prodigy
Post Prodigy

@ ended up adding this colum to the second tabel.

opg. =
var _toproject = IF(Assignment[sub projects] = "To project", 1,0)
return
IF(_toproject = 1,
LOOKUPVALUE('Project'[Main projects], 'Project'[Main projects], Assignment[Main projects]), Assignment[Main projects])

Sometimes the simplest way is the best way and a fairly simple if function did the trick.



View solution in original post

2 REPLIES 2
ThomasWeppler
Post Prodigy
Post Prodigy

@ ended up adding this colum to the second tabel.

opg. =
var _toproject = IF(Assignment[sub projects] = "To project", 1,0)
return
IF(_toproject = 1,
LOOKUPVALUE('Project'[Main projects], 'Project'[Main projects], Assignment[Main projects]), Assignment[Main projects])

Sometimes the simplest way is the best way and a fairly simple if function did the trick.



v-yiruan-msft
Community Support
Community Support

Hi @ThomasWeppler ,

I'm not clear about your requirement. Could you please provide some raw data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples? By the way, is there any relationship between these two tables(include Main projects (1), sub projects (2) and connected projects (3))? If yes, please provide the related info. It would be helpful to find out the solution. You can refer the following links to share the required info:

How to provide sample data in the Power BI Forum

 

And It is better if you can share a simplified pbix file. You can refer the following link to upload the file to the community. Thank you.

How to upload PBI in Community

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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