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
gaiusgw
Helper III
Helper III

Comparing top selling products to products customers have on order

I am not sure how to go about this and would love some feedback. I would like to be able to identify products customers are missing from top ranked products. 

 

Top selling products come from calculate(sum(OPENDET[ORIG_QTY]) and product name comes from OPENDET[STYLES] and looks like this. 

 

Capture.JPG

 

When no customer is selected on the page, the result of the measure above is the total for all customers. I would need to be able to select a customer and have it compare to the total as if no customer is selected. I would like the result to highlight what a selected custom does not have. 

 

I am sure more info might be needed so please let me know what details might be needed. Thanks. 

 

8 REPLIES 8
mahoneypat
Employee
Employee

If your customer column is in a separate table, you may be able to just add + 0 to your current measure.  Products they didn't buy should then show in your table with a 0.

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


I gave this a try but the issue while it true that it prevents items with 0 units ordered from being filtered out when customer slicer is selected, it also changes the order of what does show and displays 0 units in alpha order so I lose my ranking based on volume of units. Maybe I am missing something? 

 

Capture.JPG

v-eqin-msft
Community Support
Community Support

Hi @gaiusgw ,

 

Sorry for that the information you have provided is not making the problem clear to me.🤔

Please tell us what you expect to help us clarify your scenario.

 

Best Regards,
Eyelyn Qin

Here is another way to put it. I have a slicer for customer name. When no customer is selected, the styles fields shows total units for all customers. When i choose a customer on the slicer, the styles field is narrowed down to just what they have ordered. I need to be able to generate a result that indicates what the customer does not have on order from the full list. So basically, it would be a measure that compares the slice selected customer's styles and the full list when no customer slice is selected. I hope that clears it up.  

 

Capture.JPG

Hi,

You may drag my measure (see my previous reply) to the Styles table and then filter that measure (in the filter pane) by blanks.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,

I tried your measure but cannot get it to work. Here is a snip of it:

 

gaiusgw_0-1627912839358.png

 

Units on my table is sum(OPENDET[ORIG_QTY]. I replaced units from your suggested measure with OPENDET[ORIG_QTY] and got the error above. If I add sum, it says there are too many arguments. I am not sure what I am missing to get your measure to work. 

 

Would love some more feedback. Thanks a lot. 

 

Hi,

The first input of the CALCULATE() function has to be a measure.  So it should either be [units] or SUM(OPENDET[ORIG_QTY]).  If it still does not work, then share the link from where i can download your PBI file clearly showing the error.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ashish_Mathur
Super User
Super User

Hi,

This measure should work

All sales = calculate([units],all(OPENDET[STYLES]))


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.