March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
neHey.
I need your help, as soos as possible:
hier ist my table
Date-sting | Date | Cost | Costdifference by day |
01.-01.10. | 01.10.2021 | 1 519 995,92 | |
01.-04.10. | 04.10.2021 | 3 759 429,15 | |
01.-05.10. | 05.10.2021 | 5 912 983,88 | |
01.-06.10. | 06.10.2021 | 8 681 894,87 | |
01.-07.10. | 07.10.2021 | 11 334 598,81 | |
01.-10.10. | 10.10.2021 | 14 416 893,77 | |
01.-11.10. | 11.10.2021 | 17 317 876,87 | |
01.-12.10. | 12.10.2021 | 20 114 197,38 | |
01.-13.10. | 13.10.2021 | 23 326 011,89 | |
01.-14.10. | 14.10.2021 | 26 045 726,91 | |
01.-15.10. | 15.10.2021 | 28 475 989,33 | |
01.-18.10. | 18.10.2021 | 31 775 465,70 | |
01.-19.10. | 19.10.2021 | 34 655 781,70 |
i need to calcute, my cost myday - (myday-1)
i try this, but its not correct. and for weekend and holidays haven't any cost.
in mondays, ist thePreviousDay Friday.
Day-1_Global =
VAR _globalPreviousDay = CALCULATE (
SUM ( DeliveryDetails[Global]),
FILTER (
DeliveryDetails,
DeliveryDetails[DeliveryDatum]
= EARLIER ( [DeliveryDatum] ) - 1
))
RETURN DeliveryDetails[Global] - _globalPreviousDay
please help me. 😞
i must finished this tomorrow.
best regarsd 🙂
Solved! Go to Solution.
@lboldrino Incorrect that it is incorrect. 🙂 Worked for me. Are you dates really dates or text? See attached PBIX.
@Greg_Deckler : you are the Best!
Done. I rebuild my table in M Query and your solution is correct !
thanX a lot 🙂
Please any Idea?? 😐
@lboldrino See my article on Mean Time Between Failure (MTBF) which uses EARLIER: http://community.powerbi.com/t5/Community-Blog/Mean-Time-Between-Failure-MTBF-and-Power-BI/ba-p/3395....
The basic pattern is:
Column =
VAR __Current = [Value]
VAR __PreviousDate = MAXX(FILTER('Table','Table'[Date] < EARLIER('Table'[Date])),[Date])
VAR __Previous = MAXX(FILTER('Table',[Date]=__PreviousDate),[Value])
RETURN
__Current - __Previous
sorry but nor correct.
Day-1_Global =
VAR __Current = [Global]
VAR __PreviousDate = MAXX(FILTER(DeliveryDetails,DeliveryDetails[DeliveryDatum] < EARLIER(DeliveryDetails[DeliveryDatum] )),DeliveryDetails[DeliveryDatum] )
VAR __Previous = MAXX(FILTER(DeliveryDetails,[DeliveryDatum]=__PreviousDate),[Global])
RETURN
__Previous
-- __Current - __Previous
i will to have this result:
Date-sting | Date | Cost | Costdifference by day |
01.-01.10. | 01.10.2021 | 1 519 995,92 | 1 519 995,92 |
01.-04.10. | 04.10.2021 | 3 759 429,15 | 2 239 433,23 |
01.-05.10. | 05.10.2021 | 5 912 983,88 | 2 153 554,72 |
01.-06.10. | 06.10.2021 | 8 681 894,87 | 2 768 911,00 |
01.-07.10. | 07.10.2021 | 11 334 598,81 | 2 652 703,93 |
01.-10.10. | 10.10.2021 | 14 416 893,77 | 3 082 294,96 |
01.-11.10. | 11.10.2021 | 17 317 876,87 | 2 900 983,11 |
01.-12.10. | 12.10.2021 | 20 114 197,38 | 2 796 320,51 |
01.-13.10. | 13.10.2021 | 23 326 011,89 | 3 211 814,51 |
01.-14.10. | 14.10.2021 | 26 045 726,91 | 2 719 715,02 |
01.-15.10. | 15.10.2021 | 28 475 989,33 | 2 430 262,42 |
01.-18.10. | 18.10.2021 | 31 775 465,70 | 3 299 476,37 |
01.-19.10. | 19.10.2021 | 34 655 781,70 | 2 880 316,00 |
@lboldrino Incorrect that it is incorrect. 🙂 Worked for me. Are you dates really dates or text? See attached PBIX.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
124 | |
87 | |
85 | |
70 | |
51 |
User | Count |
---|---|
205 | |
153 | |
97 | |
79 | |
69 |