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
YavuzDuran
Helper III
Helper III

Previous Day's Numbers w/ Today's Numbers in the Same Table

I am trying to create a measure for Previous Days' numbers to put into the same table w the dates' numbers as you will see in the screenshot in red box. Where

G4 =SUMIFS($D:$D,$B:$B,F4,$C:$C,"A")/SUMIF($B:$B,F4,$D:$D)

 

Anyone who can help me?

YavuzDuran_1-1702325625642.png

 

Unit NoDateCategoryAmount
Unit 11/15/2023A   2,977.07
Unit 21/15/2023B   4,926.79
Unit 31/15/2023A   4,741.44
Unit 41/15/2023A   2,881.64
Unit 51/15/2023B   7,563.46
Unit 61/15/2023C   8,255.05
Unit 71/15/2023D   1,070.02
Unit 81/15/2023D   9,137.65
Unit 91/15/2023D   6,646.16
Unit 101/15/2023B   4,274.56
Unit 11/16/2023A   5,858.59
Unit 21/16/2023B      488.41
Unit 31/16/2023C   5,527.66
Unit 41/16/2023C   6,886.18
Unit 51/16/2023C   1,060.05
Unit 61/16/2023D   5,714.39
Unit 71/16/2023B   7,397.50
Unit 81/16/2023C   5,734.51
Unit 111/16/2023A   4,992.62
Unit 121/16/2023B   3,346.84
Unit 131/16/2023C   7,248.36
Unit 11/17/2023D2425.138
Unit 21/17/2023A7488.183
Unit 31/17/2023D5706.995
Unit 41/17/2023A6162.164
Unit 51/17/2023A1955.654
Unit 61/17/2023B4854.142
Unit 71/17/2023B5091.207
Unit 81/17/2023C3758.949
Unit 111/17/2023C4149.307
Unit 121/17/2023C5754.827
Unit 141/17/2023B7792.382
Unit 151/17/2023B8444.982
Unit 161/17/2023B145.6482

 

 

 

1 REPLY 1
Jihwan_Kim
Super User
Super User

Hi,

I am not sure how your semantic model looks like, but I tried to create a sample pbix file like below.

Please check the below picture and the attached pbix file.

I hope the below can provide some ideas on how to create a solution for your semantic model.

 

Jihwan_Kim_1-1702329961707.png

 

 

Jihwan_Kim_0-1702329916348.png

 

OFFSET function (DAX) - DAX | Microsoft Learn

 

previous day percentage: =
CALCULATE (
    [Percentage:],
    OFFSET ( -1, ALL ( 'Date'[Date] ), ORDERBY ( 'Date'[Date], ASC ) )
)

 

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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.