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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
gvandalay
Regular Visitor

struggling with matrix aggregation results

for some reason my return quantity is showing incorrectly.

 

I have the return set as a measure, but when i put it in the matrix it shows incorrectly.  I am pretty new and cannot figure this out.   someone suggested to me that i might have the field set to display max value, but i do not even see that as an option.  any help you could give would be great.  was laid off and have a potential job opportunity, but i need to be able to demonstrate that i can handle powerbi.  wanted to attach the file but do not see an attach option.

 

gvandalay_1-1731523053809.png

 

 

1 ACCEPTED SOLUTION

no problem, your relationship between adventure works and the calendar is deactivated, its got a dotted line.  you need to double click on it and make it active.  that why the relattionship isn't working right now





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




View solution in original post

8 REPLIES 8
vanessafvg
Super User
Super User

are all these fields  from the same table?  have you explicitly written a measure?  whats the code for return?  or is it a column in a table





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




i wrote a measure for this.   doesn't make sense.  here is the measure i wrote for the return

return = sum('AdventureWorks Returns Data'[ReturnQuantity])
 
and here is the measure i wrote for the order quantity
Order Quantity =
sum(
    'Sales Data'[OrderQuantity])

those are different tables and you can see there is no relationship between them because the number is the same on each row. you have to create a relationship to join them.

 

you cannot join a transactional table to a transactional table unless you merge them but you need to know how to join them, what are the common fields between them?





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




one to many.   rolling calendar table joined to sales table and return table.  thank you so much for your time.

 

gvandalay_0-1731527617710.png

 

Thanks for the replies from vanessafvg and abpgupta.

 

Hi @gvandalay ,

 

After following vanessafvg's advice and creating and activating the relationship, did you get the desired results, and if so can you mark the reply that helped you as a solution, which will also help members of the community with similar issues. If there are any more questions, please feel free to let us know.


In addition, regarding the creation of relationships, it would be helpful to read the following links:

Model relationships in Power BI Desktop - Power BI | Microsoft Learn
Active vs inactive relationship guidance - Power BI | Microsoft Learn

 

Best Regards,
Zhu

no problem, your relationship between adventure works and the calendar is deactivated, its got a dotted line.  you need to double click on it and make it active.  that why the relattionship isn't working right now





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




abpgupta
Continued Contributor
Continued Contributor

While working with measures, you need to understand what's correct value to display for each context:
1. Row Context ( what other fields involved)

2. Filter Context ( outside filters)  

Max etc function can be set inside measure calculation so you don't need option to change on UI.

My suggestion is breakdown your problem logic using Table visual to arrive at correct result for given row context and then use performance analyzer to generate DAX for creating measure. 
 
 

no idea how to do that.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.