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

Prepping for a Fabric certification exam? Join us for a live prep session with exam experts to learn how to pass the exam. Register now.

Reply
AmandaHore
Frequent Visitor

Help with values in a Matrix

 Hi

I need help with getting all the values shown in a Matrix

The matrix is a list of projects and project tasks for a person.  It shows the hours they were allocated on the project (Task Hours), the hours they have wroked and a measure showing the remaining hours.  

If a person has Task hours on a project, but no hours worked it is not showing up in the Matrix.  

If the person has hours worked but no task hours it does show up.  

 

AmandaHore_1-1742955795552.png

 

How do I get matrix lines to show up if the task hours exists for this person?  

I have tried for the rows to 'show items with no data' but it does not work.  

 

I basically want to show: 

If worked hours is > 0 show worked hours and task hours

If worked hours = 0 and task hours is > 0 show worked hours and task hours.  

8 REPLIES 8
v-echaithra
Community Support
Community Support

Hi @AmandaHore ,


If the issue is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.

 

Regards,
Chaithra.

v-echaithra
Community Support
Community Support

Hi @AmandaHore ,

As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

 

Regards,

Chaithra E.

v-priyankata
Community Support
Community Support

Hi @AmandaHore 

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

This has not resolved the issue - as I needed to do a filter within that.  I have gone down a different path to address as this was getting a bit too complicated for my experience and what we were trying to achieve. 

v-priyankata
Community Support
Community Support

Hi @AmandaHore,
Can you please try below DAX

Task Hours Display =

IF(

        SUM('Table'[Task Hours]) > 0,

    SUM('Table'[Task Hours]),

    0

)

 

Worked Hours Display =

IF(

    SUM('Table'[Hours Worked]) > 0,

    SUM('Table'[Hours Worked]),

    0

)

 

remaining hours display = [Task Hours Display] - [Worked Hours Display]

 

I tried reproducing the scenario, and below is the screenshot of the output for the above DAX queries. Please verify if it works for you as well. If not, kindly provide me with a sample of your data so that I can provide a solution.

 

vpriyankata_0-1743055168536.jpeg


Thanks.

AmandaHore
Frequent Visitor

Thanks Pankaj - I could not add the 2 new measures as rows, It lets me add them as values.

When I added them as values it included all the rows for all projects in the system.  Even where all 3 columns (Task hours, worked hours and remaining hours are 0.  

Hello @AmandaHore 

 

You can try this measure it will exclude the zero

 

TaskHoursFiltered =
IF(SUM('Table'[Task Hours]) > 0 ||
SUM('Table'[Worked Hours]) > 0 ||
SUM('Table'[Remaining Hours]) > 0,
SUM('Table'[Task Hours]))

 

Thanks,
Pankaj

If this solution helps, please accept it and give a kudos, it would be greatly appreciated.

pankajnamekar25
Solution Sage
Solution Sage

Hello @AmandaHore 

 

You try this

Remaining Hours =
VAR TaskHours = SUM('Table'[Task Hours])
VAR WorkedHours = SUM('Table'[Worked Hours])
RETURN IF(ISBLANK(WorkedHours), 0, TaskHours - WorkedHours)

 

 

Worked Hours Adjusted =
IF( ISBLANK( SUM('Table'[Worked Hours]) ), 0, SUM('Table'[Worked Hours]) )

Task Hours Adjusted =
IF( ISBLANK( SUM('Table'[Task Hours]) ), 0, SUM('Table'[Task Hours]) )

 

 

 

Thanks,
Pankaj

If this solution helps, please accept it and give a kudos, it would be greatly appreciated.

Helpful resources

Announcements
May PBI 25 Carousel

Power BI Monthly Update - May 2025

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

Notebook Gallery Carousel1

NEW! Community Notebooks Gallery

Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.

May 2025 Monthly Update

Fabric Community Update - May 2025

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