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
Support updating connection Details for existing Virtual Network Gateway connections
Microsoft Fabric REST APIs to support updating the connection Details of an existing Virtual Network Gateway connection, particularly the server name and port for PostgreSQL connections. Currently...v-nandagm9 minutes agoMicrosoft EmployeeNew2Views5likes0CommentsAllow admins to restrict granting Build permission when sharing Power BI reports.
Please provide an administrative control to prevent selected users from granting semantic model Build permission when sharing Power BI reports. This could be implemented by either: - Allowing adm...Yuto_Watarai113 minutes agoMicrosoft EmployeeNew3Views0likes0CommentsRun OnDemand Fabric Data Pipeline with Runtime Parameters using REST API
Currently, Microsoft Fabric Data Pipelines can be triggered on demand, but there is no native capability to pass runtime parameter values when initiating a pipeline execution through REST APIs. This ...singhs852 minutes agoNew MemberNew27Views2likes1CommentRevival of report hiding feature in New App UI
The previous App UI, we can hide report pages in app settings, and we can use cross report drill-through with the target reports hidden. This was a great way to build a simple app. But in contrast t...hyaman913 hours agoMicrosoft EmployeeNeeds Votes627Views39likes8CommentsAllow hiding non-functional JSON file links in Fabric Data Agent responses
**Description** Fabric Data Agent automatically displays generated JSON file references (e.g., `result_4.json`) alongside query results, even when the user asks a simple question that returns a sing...sh_130974 hours agoNew MemberNew4Views0likes0Comments