cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sqzqsol
New Member

Filter concatenated text by date slicer

Hi,

 

Power BI newbie. I wanted to know the top category by sales per place, per year so I created a calculated table with a calculated column for the rank that looks like this:

 

sqzqsol_0-1669426170363.png

I tried to concatenate the categories for my visual using this measure:

 

Top Category = CONCATENATEX(FILTER(Table, Table[Rank]=1), Table[Category], ",")

 

But this is what I got despite the date on the slicer being Year 3:

 

sqzqsol_1-1669426526675.png

I've been working on this for quite some time and can't seem to find any solution. I'd appreciate any help. Thanks in advance.

 

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

These measures work

Sales = SUM(Data[Total sales])
Max sales = MAXX (VALUES(Data[Category]),[Sales])
Best selling category = CONCATENATEX(TOPN(1,VALUES(Data[Category]),[Sales]),Data[Category],",")

Hope this helps.

Untitled.png


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

View solution in original post

1 REPLY 1
Ashish_Mathur
Super User
Super User

Hi,

These measures work

Sales = SUM(Data[Total sales])
Max sales = MAXX (VALUES(Data[Category]),[Sales])
Best selling category = CONCATENATEX(TOPN(1,VALUES(Data[Category]),[Sales]),Data[Category],",")

Hope this helps.

Untitled.png


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

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Dev Camp Session 30

Ted's Dev Camp - January 26, 2023

This session will provide guidance and teach campers the skills required to build Power BI reports that support multiple languages.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.