How to make a dynamic comment text box in Power BI that changes based on the selected supplier.
Scenario
- If no supplier is selected → the comment box should be empty.
- If one supplier is selected → show the supplier name and its comment.
- If multiple suppliers are selected → keep it blank (or show a message if needed).
Solution
Create a DAX measure like this:
✅ Explanation
HASONEVALUE()checks if exactly one supplier is selected.- If not, return
BLANK()(so the card/text box stays empty). - If yes, concatenate the supplier name and its comment using
&.
How to Display
- Use a Card visual or a Text box with conditional formatting bound to this measure.
- When blank, the card will appear empty; when a supplier is selected, it shows
"Supplier Engineer - Comment".
💡 Extra Tip: You can add logic to handle multiple comments or show a friendly message when multiple suppliers are selected.
Comments
Post a Comment