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
RenataOGardner
Helper II
Helper II

Dynamic text for TopN

Hello Folks!

I would like to know if it's possible to add a dynamic text box to tell me which are the most sold product when I select a customer?

 

Many thanks,

Renata

2 ACCEPTED SOLUTIONS

Try using this measure:

Top10 = SumX(TOPN(10,SUMMARIZE(ProductTable,ProductTable[Product Name],"UnitsSale",[TotalSales]),[UnitsSale],DESC),[TotalSales])

Put this measure in the values.

If this doesn't work, try:

Top10 = TOPN(10,TOPN
(10,
SUMMARIZE(
ProductTable
,ProductTable[ProductName],"TotalUnits", SUM(ProductTable[UnitsSold])
),"TotalUnits",DESC))

Additionally, make sure the customer and the product information is related in some way, eiether using a relationship or is part of the same table.

View solution in original post

Icey
Community Support
Community Support

Hi @RenataOGardner ,

 

Try this:

Top 10 Products =
CONCATENATEX (
    TOPN (
        10,
        SUMMARIZE ( 'Table', 'Table'[Product], "Sales_", [Your Sales Measure] ),
        [Sales_], DESC
    ),
    [Product],
    ", "
)

products.gif

 

 

Best Regards,

Icey

 

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

8 REPLIES 8
Icey
Community Support
Community Support

Hi @RenataOGardner ,

 

Try this:

Top 10 Products =
CONCATENATEX (
    TOPN (
        10,
        SUMMARIZE ( 'Table', 'Table'[Product], "Sales_", [Your Sales Measure] ),
        [Sales_], DESC
    ),
    [Product],
    ", "
)

products.gif

 

 

Best Regards,

Icey

 

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

RenataOGardner
Helper II
Helper II

Hi, thanks for your reply guys, and sorry if I wasn't clear. What I want here is: when I select the customer on the slicer, I would like to have a text listing the Top10 products based on units. Many thanks!

 

image.png

 

Try using this measure:

Top10 = SumX(TOPN(10,SUMMARIZE(ProductTable,ProductTable[Product Name],"UnitsSale",[TotalSales]),[UnitsSale],DESC),[TotalSales])

Put this measure in the values.

If this doesn't work, try:

Top10 = TOPN(10,TOPN
(10,
SUMMARIZE(
ProductTable
,ProductTable[ProductName],"TotalUnits", SUM(ProductTable[UnitsSold])
),"TotalUnits",DESC))

Additionally, make sure the customer and the product information is related in some way, eiether using a relationship or is part of the same table.

Hello, thanks for your help.

I used the second and works pretyr good.

Thanks.

Can you please mark the relevant one as an accepted solution?

How do I do that? I can't see this option.

Tahreem24
Super User
Super User

@RenataOGardner A Text box wont help you in this case. Instead, you should you Card Visuals and put the displaying field on that card.

 

Don't forget to give thumbs up and accept this as a solution if it helped you!!!

Please take a quick glance at newly created dashboards : Restaurant Management Dashboard , HR Analytics Report , Hotel Management Report, Sales Analysis Report , Fortune 500 Companies Analysis , Revenue Tracking Dashboard
PC2790
Community Champion
Community Champion

Hello,

 

Try creating a measure similar to below and use it in a card visual:

BestSellingProduct = MAXX(SUMMARIZE(ProductTable,ProductTable[ProductName],"Sales",[TotalSalesMeasure]),ProductTable[ProductName])

If this doesn't work for you,please share your sample data

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.

Top Solution Authors