Forum Discussion
Dynamic column headers in matrix visual
- 1 year ago
If you have still not found a solution - I have made a video on this specific requirement - do check it out and let me know if this helps!
Stop Using Static Headers! Create a Fully Dynamic Power BI Matrix | MiTutorials
- 1 year ago
Apologies, guys. Sorry for the delayed reply. Occupied with other work.
I haven't implemented the suggestions. But checked the miTutorials solution, it will work for me. danextian's suggestions are aslo useful for my other requirements.
You could add a dummy row to your Platform table and call it "Date Range".
The letter D for Date will be sorted before P for Plaform, so it wil appear under your header.
Then create a measure to return a single date or the date range as text
Date range text =
SELECTEDVALUE('Calendar'[Date],
MIN('Calendar'[Date])
& " to " &
MAX('Calendar'[Date])
)
Then use this in your all your measures
Units Sold_1DayAgo =
IF(SELECTEDVALUE(yourtable[Platform] = "Date range",
[Date range text],
CALCULATE(
[Total Units Sold],
'Calendar'[Date] = TODAY() - 1
)
)
Please click thumbs up just for the helpful suggestion
and click [accept solution] if it works.