Dynamic Column Labels in Power BI Based on Selected Date
Hi all,
I’m trying to create dynamic column labels in Power BI based on a date selected by the user.
Scenario:
I have a dataset showing Stock on Hand (SOH) by date and product. In Power BI, I want to build a table where a slicer allows users to select a date. When a date is selected:
The first column shows Current SOH for that date, and its label dynamically displays the selected date.
The second column shows SOH for the previous day (selected date - 1), and its label updates accordingly.
I can calculate the measures using DAX, but I haven’t found a way to make the column headers update dynamically based on the selected date.
Example logic:
SOH_SelectedDate = CALCULATE( SUM(Data[SOH]), Data[Date] = SELECTEDVALUE(DateTable[Date]) ) SOH_PreviousDate = CALCULATE( SUM(Data[SOH]), Data[Date] = SELECTEDVALUE(DateTable[Date]) - 1 )What I’ve tried:
Using SELECTEDVALUE() and FORMAT() for card visuals (works fine for titles, not for table headers).
Disconnected tables and parameters for date selection.
Context:
I previously used Qlik, which allows users to define both a measure and a label expression dynamically. I’m looking for a similar capability in Power BI.Any ideas or workarounds would be greatly appreciated!
Thanks,
Gavin
Recent ideas
Sparklines: customizable data point limit (allow more than 52 points)
Sparklines in table and matrix visuals currently display up to 52 data points per sparkline. We'd like to suggest a customizable data point limit, so report authors can allow more than 52 points and ...v-kkalvala5 hours agoMicrosoft EmployeeNew14Views2likes0CommentsAllow dynamic headers for Calculation Groups
calculation Groups reduce duplicated DAX, but their Calculation Item names become static Matrix headers such as Current, MTD, QTD, and YTD. These headers do not tell report consumers which measure i...danieleloFabric7 hours agoNew MemberNew9Views1like0CommentsCentralized retention policies for imported data in Power BI semantic models
Summary Please provide a tenant-level retention policy that allows administrators to centrally enforce automatic deletion of expired data from Power BI Import semantic models, independently of data ...JINHOYOO7 hours agoMicrosoft EmployeeNew64Views19likes1CommentResizable Personalize visual pane or wrapped field names
Problem: The Personalize Visual pane width is fixed and long measure/column names are cropped making it difficult for users to identify which item to add to their visual. Idea: Allo...Simon_AUS13 hours agoRegular VisitorNew46Views8likes0Comments