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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Measure returns same value for all rows in matrix

I know there's a similar thread for this issue, but I'm new to DAX and I'll admit the advice given went over my head. 

 

My measure is meant to return the due date for the last task of a particular type. When applied to a table visual of various projects, I expected it to give me the last due date for each project, but instead it's returning the same value (the last due date of all work planning tasks of all projects). I believe I need to introduce some type of row context, I am thinking - how do I group the tasks by project within the measure, but I thought applying it to the visual should accomplish that.

 

Thank you for your help!

 

EndofWork =
CALCULATE(
    MAX( FactTasks[DueDate] ),
    DimTasks[TaskType] = "Software - Work Planning"
)
 
 
Here is a simplified version of the table I am creating. 
eloomis_0-1673552216218.png

 

I would like end of work to group by ProjectID and return the max of each type.

 

Relevant tables/relationships:

eloomis_1-1673552906058.png

 

 

There are some filters on the page, non of which should inhibit the measure.

1 ACCEPTED SOLUTION
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

I simulated some data hoping to restore your problem. Please check the attachment.

EndofWork = 
CALCULATE ( MAX ( FactTasks[DueDate] ),
    FILTER ( ALL ( DimTasks ),
        DimTasks[TaskType] = "Software - Work Planning"
            && [ProjectID] = SELECTEDVALUE ( FactTasks[ProjectID] )
    )
)

vzhangti_0-1673589199290.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

View solution in original post

4 REPLIES 4
v-zhangti
Community Support
Community Support

Hi, @Anonymous 

 

I simulated some data hoping to restore your problem. Please check the attachment.

EndofWork = 
CALCULATE ( MAX ( FactTasks[DueDate] ),
    FILTER ( ALL ( DimTasks ),
        DimTasks[TaskType] = "Software - Work Planning"
            && [ProjectID] = SELECTEDVALUE ( FactTasks[ProjectID] )
    )
)

vzhangti_0-1673589199290.png

Is this the result you expect?

 

Best Regards,

Community Support Team _Charlotte

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

FreemanZ
Super User
Super User

hi @Anonymous 

For the ProjectId in your table visual, where does it come from?

adudani
Super User
Super User

Please share some sample input data removing sensitive information with a sample output if possible.

 

the current measure only provides the max date in the fact table for software work planning task type and that is the recurring date that must be showing..

Did I answer your question? Mark my post as a solution, this will help others!
If my response(s) assisted you in any way, don't forget to drop me a Kudos 🙂
Kind Regards,
Avinash
Anonymous
Not applicable

Edited the original post with more details, let me know if there's anything else I can share.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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