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
ThomasWeppler
Skilled Sharer
Skilled Sharer

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
Skilled Sharer
Skilled Sharer

@ 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
Skilled Sharer
Skilled Sharer

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