Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Display latest 10 week data in pivot table

Hi I have a table with Product as Row, Units Sold as Value and Calendar Month as Column as in the attachmentQueryExample.PNG

 

I want to create a Matrix chart as above. 

1. Calendar Week as Column should be sorted in descending order.

2. Calendar Week is populated from the source itself with year and week number together. Every time I open my Dashboard I want to see the lastest 10 weeks data based on the refresh date. 

 

Note: I mentioned by mistake the column as Calendar Month in the image attached.. it should be Calendar Week.

Example as above: Consider we are in 201810 th week.

 

When I refresh my dashboard the next week ie. 201811 then I should see the chart as belowQueryExample3.PNG

 

 

 

3. If I select from Slicer any week then the above chart should display the last 10 weeks data.

For example: If I select 201740 from slicer. Then my Matrix chart should display the corresponding data

 

QueryExample2.PNG

 

 

Can someone help me on this please?

3 REPLIES 3
Greg_Deckler
Super User
Super User

Well, you could create a table with a single row and a column that is basically:

 

Column = TODAY()

This will get set to the latest refresh time. You should then be able to use this to do a filter on your matrix. But, without sample data, etc. would be difficult to be more specific.

 

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Thanks for your Suggestion Greg, as you see I have shared an example of what I am actually looking for in the attached Photos.  As I am just learning Power BI. I don't have an organized data source or .pbix to share with you. In the photo attached I have mentioned Calendar Month which should be Calendar Week. Sorry about that 😞  

The issue is that you are showing the result of what you want, which is great, but not what the source data looks like, even if you just mock it up. Makes a big difference in the actual correct solution.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.