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
Control Schedule Activation per Environment in Deployment Pipelines
Currently, with the new multiple scheduler feature, we can define multiple run schedules for a Fabric item. However, when using deployment pipelines, there’s no way to control which schedules are act...frithjof_v56 minutes agoCommunity ChampionPlanned5.6KViews64likes10CommentsLet Workspace Admins manage Fabric Policies
For example, allow a Workspace Admin to grant other identities the Contributor role, while also granting them higher privileges in certain areas, e.g. List Workspace role permissions (without resha...frithjof_v3 hours agoCommunity ChampionNew44Views0likes3CommentsSupport Fabric SQL Database with workspace-level inbound Private Link
Fabric SQL Database supports tenant-level Private Link but not workspace-level Private Link. Securing a small number of databases therefore requires enabling Private Link across the entire tenant, in...WorkFull224 hours agoAdvocate INew49Views1like3CommentsShow Refreshing indicator in workspace for semantic model refreshes from pipelines and XMLA
When I start a semantic model refresh by hand ("Refresh now") or from a schedule, the workspace list shows a spinning refresh icon next to the model. That way, anyone can see a refresh is running. T...JDownes7 hours agoRegular VisitorNew11Views0likes0CommentsREST API - exclude hidden report pages
For the "Reports - Get Pages" REST API call, exclude hidden report pages or indicate that the page is hidden.alec_johnson8 hours agoNew MemberNeeds Votes652Views32likes10Comments