Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
Hello,
I need to create a matrix view which show Units sold where first 4 columns are last 4 days, next 2 columns are current and previous week and next are YTD and next 2 columns are MTD of Current and Target
Expected output should be likeHere first 4 columns of dates should change dynamically daily.
For example,
Today is 10-Feb-2025, then column should show previous 4 days which are 9-Feb, 8-Feb,7-Feb, 6-Feb.
So on next day , where Today = 11-Feb-2025, then column should show 10-Feb, 9-Feb,8-Feb, 7-Feb.
Same goes with Weeks, Current week is week#6, Previous week is week#5. When week changes ,Current week will be week#7, Previous week is week#6.
I have manged to create some portion of it. To get 4 days, I have created 4 measures,
for example
Units Sold_1DayAgo =
CALCULATE(
[Total Units Sold],
'Calendar'[Date] = TODAY() - 1
)
and dragged them into matrix visual Values well. This created the columns, but headers are not changing , they are static. Headers of date columns should change dynamically as Today shifts. Also week header should change on week changes.
1. How to create dynamic headers for this?
2. I have created 4 measures for 4 days. Is there any better way to acheive same, how?
3. Is double header possible with matrix visual ( first image ) , how?
Thanks
Solved! Go to Solution.
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
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.
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.
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
Hi @rahul-opp ,
Whether the advices given by speedramps and danextian have solved your confusion, if the problem has been solved you can mark the reply for the standard answer to help the other members find it more quickly. If not, please point it out.
Best Regards,
Neeko Tang
Hello all, thanks for quick response. I will check the suggested solutions and reply back in some time.
Hi @rahul-opp ,
As we haven’t heard back from you, we wanted to kindly follow up to check if your issue is resolved? or let us know if you need any further assistance.
If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.
Best Regards,
Neeko Tang
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.
Hi @rahul-opp
You will need a disconnected table that contains a column containing the dates, week numbers, the words YTD, Current and Target and their categorization (MTD, Units), their custom column sort and then a measure referencing the values in the first column. What you're trying to achieve is not impossible but definitely not for the beginners. Please see attached sample pbix files.
Check out the April 2025 Power BI update to learn about new features.
Explore and share Fabric Notebooks to boost Power BI insights in the new community notebooks gallery.
User | Count |
---|---|
102 | |
68 | |
45 | |
37 | |
36 |