Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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?
Unit No | Date | Category | Amount |
Unit 1 | 1/15/2023 | A | 2,977.07 |
Unit 2 | 1/15/2023 | B | 4,926.79 |
Unit 3 | 1/15/2023 | A | 4,741.44 |
Unit 4 | 1/15/2023 | A | 2,881.64 |
Unit 5 | 1/15/2023 | B | 7,563.46 |
Unit 6 | 1/15/2023 | C | 8,255.05 |
Unit 7 | 1/15/2023 | D | 1,070.02 |
Unit 8 | 1/15/2023 | D | 9,137.65 |
Unit 9 | 1/15/2023 | D | 6,646.16 |
Unit 10 | 1/15/2023 | B | 4,274.56 |
Unit 1 | 1/16/2023 | A | 5,858.59 |
Unit 2 | 1/16/2023 | B | 488.41 |
Unit 3 | 1/16/2023 | C | 5,527.66 |
Unit 4 | 1/16/2023 | C | 6,886.18 |
Unit 5 | 1/16/2023 | C | 1,060.05 |
Unit 6 | 1/16/2023 | D | 5,714.39 |
Unit 7 | 1/16/2023 | B | 7,397.50 |
Unit 8 | 1/16/2023 | C | 5,734.51 |
Unit 11 | 1/16/2023 | A | 4,992.62 |
Unit 12 | 1/16/2023 | B | 3,346.84 |
Unit 13 | 1/16/2023 | C | 7,248.36 |
Unit 1 | 1/17/2023 | D | 2425.138 |
Unit 2 | 1/17/2023 | A | 7488.183 |
Unit 3 | 1/17/2023 | D | 5706.995 |
Unit 4 | 1/17/2023 | A | 6162.164 |
Unit 5 | 1/17/2023 | A | 1955.654 |
Unit 6 | 1/17/2023 | B | 4854.142 |
Unit 7 | 1/17/2023 | B | 5091.207 |
Unit 8 | 1/17/2023 | C | 3758.949 |
Unit 11 | 1/17/2023 | C | 4149.307 |
Unit 12 | 1/17/2023 | C | 5754.827 |
Unit 14 | 1/17/2023 | B | 7792.382 |
Unit 15 | 1/17/2023 | B | 8444.982 |
Unit 16 | 1/17/2023 | B | 145.6482 |
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.
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.
User | Count |
---|---|
97 | |
87 | |
77 | |
67 | |
63 |
User | Count |
---|---|
112 | |
96 | |
95 | |
67 | |
65 |