Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
Hello,
I want to make a custom column that calculates the difference from the previous cell.
The testedPositive is not the increasing number of people on that day, but the cumulative total up to that day.
What I want to get is the increased number of people in each city from the day before.
That's the Difference column in the table below.
I know it's not a DAX-friendly process, but please help.
Solved! Go to Solution.
@owlet0214 , prefer to create a date from the year , month and day and create two new columns like
Last date = maxx(filter(table,[city]=earlier([city]) && [Date] <earlier([Date])),[Date])
diff = [tested positive] - maxx(filter(table,[city]=earlier([city]) && [Date] <earlier([Last Date])),[tested positive])
Thanks a lot !
I haven't gotten the expected number yet, but I think it's getting closer to the correct answer.
I will try a little more.
I use below.
Last date = maxx(filter('prefectures4',[prefectureNameE]=earlier([prefectureNameE]) && [YYYYMMDD2] <earlier([YYYYMMDD2])),[YYYYMMDD2])
diff = [testedPositive] - maxx(filter('prefectures4',[prefectureNameE]=earlier([prefectureNameE]) && [YYYYMMDD2] <earlier([Last date])),[testedPositive])
Hello, I have an identical situation, and I already managed to rescue the previous value with respect to the date, but I can not do it by differentiating it by city, I do not know if you can explain to me how it was that you used the variable of [prefectureNameE] and earlier([prefectureNameE]) for this case.
Best regards.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
123 | |
78 | |
49 | |
38 | |
37 |
User | Count |
---|---|
196 | |
80 | |
70 | |
51 | |
42 |