March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Let's say my dataset has few columns - Product, Sales & User Comments etc
I have created a bar chart product vs sales.
Now, if I select any bar, I should be able to see random sample comments about that product in a separate box.
Pretty new to powerbi, have searched for some time, unable to find any solution. Thanks in advance 🙂
Solved! Go to Solution.
Hi @daechir7 ,
sample data:
You can modify your measure:
top3 comments =
VAR _userfeedback = SELECTEDVALUE( 'Table'[User Feedback] )
VAR _rank =
RANKX (
FILTER (
ALL ( 'Table' ),
'Table'[Product Name] = SELECTEDVALUE ( 'Table'[Product Name] )
),
CALCULATE ( MAX ( 'Table'[SL.No] ) ),
,
ASC
)
VAR _top3 = IF(_rank<=3,_userfeedback,BLANK())
RETURN
_top3
sample comments =
IF (
ISFILTERED ( 'Table'[Product Name] ),
CONCATENATEX ( 'Table', [top3 comments], " | " )
,
"Please selected Product Name")
Final output:
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @daechir7 ,
I think @Uzi2019 's reply is helpful. In the meantime, I am here to talk about my thinking.
Maybe you can use Card visual to achieve your goals, I created a sample data for you:
Sample data:
1.Add new measures.
Description =
IF (
ISFILTERED ( 'Table'[Product Name] ),
SELECTEDVALUE ( 'Table'[Product Description] ),
"Please selected Product Name"
)
samlpe comments =
VAR _rank =
RANKX (
FILTER (
ALL ( 'Table' ),
'Table'[Product Name] = SELECTEDVALUE ( 'Table'[Product Name] )
),
CALCULATE ( MAX ( 'Table'[SL.No] ) ),
,
DESC
)
RETURN
IF (
ISFILTERED ( 'Table'[Product Name] ),
CALCULATE (
CONCATENATEX ( 'Table', 'Table'[User Feedback], " / " ),
FILTER ( 'Table', _rank <= 3 )
),
"Please selected Product Name"
)
2.Put two measures in the card.
Final output:
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @Anonymous , This is pretty close and exactly how I needed this, there's a slight change in the dataset now 😞 I would need at least 3 comments to show up which are in a single row, separated by a pipe '|' Adding an updated screenshot - ibb.co/ctxHkbX So, if i select the product, it must show the first 3 comments separated by pipe. Sorry, the data I am working with, the layout got changed 😞
So, store column isn't there anymore. One row for one product and comments are separated by pipe '|'. First 3 comments will work.
I truly appreciate your help and apolgies for the inconvenience.
Hi @daechir7 ,
sample data:
You can modify your measure:
top3 comments =
VAR _userfeedback = SELECTEDVALUE( 'Table'[User Feedback] )
VAR _rank =
RANKX (
FILTER (
ALL ( 'Table' ),
'Table'[Product Name] = SELECTEDVALUE ( 'Table'[Product Name] )
),
CALCULATE ( MAX ( 'Table'[SL.No] ) ),
,
ASC
)
VAR _top3 = IF(_rank<=3,_userfeedback,BLANK())
RETURN
_top3
sample comments =
IF (
ISFILTERED ( 'Table'[Product Name] ),
CONCATENATEX ( 'Table', [top3 comments], " | " )
,
"Please selected Product Name")
Final output:
How to Get Your Question Answered Quickly - Microsoft Fabric Community
If it does not help, please provide more details with your desired out put and pbix file without privacy information.
Best Regards,
Ada Wang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
This works perfectly, thank you so much 🙂
Hi @daechir7
You can use tooltip feature on product vs sales chart. follow these video for better understnding.
https://www.youtube.com/watch?v=k0cwSYNXhkI
https://www.youtube.com/watch?v=a5HlBrBygVE
https://www.youtube.com/watch?v=rxtuYqMZsZg
I hope this may help to set tooltip with top 3 comments by sales.
add table in your tooltip page and comments and other fileds you want
just use visual filter > top n >3 > put values > sales
I hope i answered your question!
Hi @Uzi2019 , thanks for your response. However, I am specifically looking to show up the comments in a text box instead of the tooltip. The Default text must say as it is in the output boxes and should show the description in one box and comments in the other box when a bar is selected.
But if I don't find a solution to my expectation, then I will utilize the one you have shared. 🙂
You can add simple table add comments and seperate table add description. when you select somthing on chart it auto filters the tables values( comments and description).
other wise there is nothing much I can suggest..
tooltip is actually a good feature that you can utilized.
I hope i answered your query.
Thanks @Uzi2019 for another great alternative. I'd still keep it open and see if the exact thing could be done. 🙂
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
16 | |
12 | |
9 | |
7 |
User | Count |
---|---|
38 | |
32 | |
28 | |
12 | |
11 |