Forum Discussion
Show Value on selected value in Column
- 1 year ago
Hello Sriku,
Thank you for reaching out to the Microsoft Power BI Community.
Based on your query, you wanted to calculate the average of the Amt column for a selected Group and Ticket combination. You've now successfully implemented the measure using the following DAX expression:
Selected Group Avg Amt =CALCULATE(
AVERAGE(Sheet1[Amt]),
FILTER(
Sheet1,
Sheet1[Group] IN VALUES(Sheet1[Group])
)
)
To allow users to interact with the data, add a slicer for the Group column (A, B, C, D). This slicer will filter the data based on the selected group, affecting the Selected Group Avg Amt measure. Then, add a table visual with the Ticket field to categorize rows and display the Selected Group Avg Amt to show the average amount for each ticket, based on the group selection. This enables dynamic insights into how Amt values vary by ticket and group.
Additionally, I have included the PBIX file that I created using the provided sample data. Kindly review it and confirm whether it aligns with your expectations.
If this solution worked for you, kindly mark it as Accept as Solution and feel free to give a Kudos, it would be much appreciated!
Thank you.
Hi Sriku,
Thanks for the follow-up!
Since you're aiming to filter each individual row of a ticket based on a selected group — and you're already using Ticket Indexing — here's a more targeted approach:
Currently, Power BI doesn't allow dynamic filtering within the same visual row purely based on selection without slicers or user interaction. However, instead of relying on indexing, you can achieve your goal by leveraging a DAX measure that reacts to Group selection and compares it per row:
Try this Dax Measure:
Show Selected Amt =
IF(
'Table'[Group] = SELECTEDVALUE('Table'[Group]),
'Table'[Amt],
BLANK()
)
It ensures that only the rows where the Group column matches the selected value (from a slicer or visual interaction) will display the amount. All other rows will return blank, effectively filtering the visual on a per-row basis without the need for Ticket Indexing.
Glad I could assist! If this answer helped resolve your issue, please mark it as Accept as Solution and give us Kudos to guide others facing the same concern.
Thank you.
v-sgandrathi , thanks for your response. But this if condition will not work