Forum Discussion
Dynamic Column Name in Table Visual Based on Date Slicer Selection
Hi,
I am using a table visual in Power BI, and I want to implement a feature where the column header and data dynamically change based on the user’s selection from a date slicer.
For example:
- If the user selects "March" from the slicer, the table should display the month name (e.g., "March") as the column header along with associated data (e.g., "Sales Week1", "Sales Week2", etc.).
- The other columns, like "Revenue Generated," should remain static, showing their corresponding values for the selected period.
Sample Table Design:
| March | Revenue Generated |
| Sales Week1 | 10,000 |
| Sales Week2 | 15,000 |
| Sales Week3 | 12,000 |
| Sales Week4 | 11,000 |
How can I achieve this using DAX or other Power BI functionalities? Any suggestions or guidance would be highly appreciated!
Thanks,
SBC
SBC
The easiest way to achive this kind of scenario is to create a separate measure and use selection of it..
Below are steps :
1) Rename the Sales week with space.
2) Create a basic measure with selected value function.
3) Drag the measure in card visual and format this...
4) Group the card visual and Table visual
Nothing fancy..
Below screenshotsThere could be a way to achive this by adding a disconected table and write a measure top of it.. But it will add an unnecessary a table into your model.
Let me know which way you want to like.
Below is the attached pbix file.Hope it helps
Regards
sanalytics
1 Reply
- sanalytics
Super User
SBC
The easiest way to achive this kind of scenario is to create a separate measure and use selection of it..
Below are steps :
1) Rename the Sales week with space.
2) Create a basic measure with selected value function.
3) Drag the measure in card visual and format this...
4) Group the card visual and Table visual
Nothing fancy..
Below screenshotsThere could be a way to achive this by adding a disconected table and write a measure top of it.. But it will add an unnecessary a table into your model.
Let me know which way you want to like.
Below is the attached pbix file.Hope it helps
Regards
sanalytics