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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Majad_Chowdhury
Advocate II
Advocate II

Creating a filter to only show items which have changed week to week

Hi,

 

I'm in the process of creating a matrix visual. The matrix visual shows values for 2 seperate weeks. However,  I want the table to only show values where theres been a change week to week.

 

I've created a quick Excel sketch to help with understanding. In the below example, we would not want "A" to appear in the matrix visual as theres been no change week to week

Majad_Chowdhury_0-1676643531804.png

 

Thanks gurus!

1 ACCEPTED SOLUTION

see attached.

 

lbendlin_0-1677773533029.png

 

View solution in original post

16 REPLIES 16
Ashish_Mathur
Super User
Super User

Hi,

  1. Would you always select only 2 weeks in the slicer?
  2. Share the download link of the PBI file with a Calendar Table already built in.  Ensure that there is a week number column in the Calendar Table

Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi,

 

We would like the default to always show the 2 most recent weeks.

 

I do not have an option to attach an pbix unless im mistaken. I've added a screenshot FYI.

 

Majad_Chowdhury_0-1677508084376.png

 

 

 

Hi,

Share the download link of the PBI file.  Also, in that file, ensure there is a Calendar Table with a Week column


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,

 

Please try the following link to download pbx: link 

Hi,

There should be a Date column in the Opportunity Table as well.  If you do not have a Date column but just a Year and Month column, please share those columns in a revised file. 


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi,

 

Please see the attached again, ive added a date column as requested.

link 

Hi,

Sorry but i cannot work it out.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

no worries, thanks for having a go 🙂 

the download link seems to have expired.

try this link
link 

see attached.

 

lbendlin_0-1677773533029.png

 

this is great! The only thing is it doesnt change when the week changes.

 

Would you mind just explaining what is happening in the measure in simple terms? 

in the current filter context find the penultimate date. Then for that date find the value.  Then compare that value to the value for the ultimate date. Use the resulting measure as a visual filter.

 

You can choose how many data points to include, it will always compare the last two.

Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523

lbendlin
Super User
Super User

your data is not in a usable format. Unpivot it first, then create your measure.

What should happen when you add  2023-07 data?

The data is unpivotted. Lets assume the data is in the following format:

 

Name, Week, Value

A, 2023-06, 50

A, 2023-07,45

etc

 

The screenshot is more a representative of the end goal.

Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Power BI Header Change

Power BI Header Update

Read about the exciting updates for the Power BI forum.

Top Solution Authors