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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply

Power BI Calculated Column to only show if data has changed from the previous date

Hello,

 

I have been making this calculated column and running into some issues. I am attaching the excel file replica of the data I am trying to use. I need a calculated column to only show data if there was a change from the previous week. Example would be say an item is there for 5 weeks. It starts off at 24, then is 24 for two more weeks, then on the 4th week it goes to 30. Then the 5th week is also 30. I need it to read out 24, blank, blank, 30, blank. If you need more details let me know and I will respond as soon as I can.

1 ACCEPTED SOLUTION
v-tianyich-msft
Community Support
Community Support

Hi @Brady-Linnebur ,

 

I made simple samples and you can check the results below:

vtianyichmsft_0-1712799149203.png

Measure = var _t = ADDCOLUMNS('Table',"A",MAXX(FILTER(ALL('Table'),[Item #]=EARLIER([Item #])&&[Week starting]=EARLIER('Table'[Week starting])-7),[Units]))
RETURN IF(MAXX(_t,[A])=MAX('Table'[Units]),BLANK(),MAX('Table'[Units]))

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
v-tianyich-msft
Community Support
Community Support

Hi @Brady-Linnebur ,

 

I made simple samples and you can check the results below:

vtianyichmsft_0-1712799149203.png

Measure = var _t = ADDCOLUMNS('Table',"A",MAXX(FILTER(ALL('Table'),[Item #]=EARLIER([Item #])&&[Week starting]=EARLIER('Table'[Week starting])-7),[Units]))
RETURN IF(MAXX(_t,[A])=MAX('Table'[Units]),BLANK(),MAX('Table'[Units]))

 

An attachment for your reference. Hope it helps!

 

Best regards,
Community Support Team_ Scott Chang

 

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

BradyLinnebur_0-1712762809289.png

I couldn't find out how to upload the excel so here is a screenshot of it.

 

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.