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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
gtamir
Post Patron
Post Patron

Count number of products by the number they were sold

Hi, I have a vizual with the product and the quantuty.

I want to count products by the quantity. Means how many products have quantity 2 and how many quantity of 3 Etc.

Should I export the visual and import it back and make the calculation, or I can do it in the visuals?

 

Giora

1 ACCEPTED SOLUTION
v-jiascu-msft
Employee
Employee

Hi Giora,

 

Please refer to the demo in the attachment. 

1. Create a calculated table. 

Solution 1 =
SUMMARIZE (
    'Table1',
    Table1[ProductName],
    "Quantity", COUNT ( Table1[Quantity] )
)

2. Create a new Table visual.

Count-number-of-products-by-the-number-they-were-sold

 

Best Regards,
Dale

Community Support Team _ Dale
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

3 REPLIES 3
v-jiascu-msft
Employee
Employee

Hi Giora,

 

Please refer to the demo in the attachment. 

1. Create a calculated table. 

Solution 1 =
SUMMARIZE (
    'Table1',
    Table1[ProductName],
    "Quantity", COUNT ( Table1[Quantity] )
)

2. Create a new Table visual.

Count-number-of-products-by-the-number-they-were-sold

 

Best Regards,
Dale

Community Support Team _ Dale
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BobBI
Resolver III
Resolver III

Hi,

 

If you make your Quantity column as Text  and then Drag into Axis and do a count you product ,

 

Drag quantity into Axis  , Legend = Product  and Value = Count of Product

 

if this is not what you were expecting please share more details and sample data.

 

qty.JPG

Thanks

SS

@BobBI The table is in the vizual not in the modelScreenHunter_024.jpg

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.