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
executeDaxQueries-like API call with effectiveUserName on SSO-enabled model with Service Principal
Please provide a way for a service principal to execute DAX - with an effective user name - against an SSO-enabled directlake semantic model and get per-user results that respect lakehouse OneLake Se...sean_cochran17 minutes agoResolver INew12Views1like1CommentEnable Analyze in Excel Without Build Permissions on Power BI Semantic Models
Description: Currently, Power BI requires users to have Build permissions on a semantic model to use the Analyze in Excel feature. However, this permission also grants users the ability to create new...Anonymous1 hour agoNot applicableNew3.8KViews26likes2CommentsMicrosoft Tornado visual needs tooltip well and a Legend
I'm using the Microsoft Tornado 3.2.1.0 and can't believe it has been available for over 10 years and not updated to have a legend or tooltip well. You also cannot add a tooltip page - it is grayed ...cstjohn4 hours agoAdvocate INew5Views0likes0Comments