Power Pivot difficult IF

gchain

New Member
Joined
Sep 1, 2019
Messages
1
I have this setup:

```
date cost
22 march 2018 100
10 january 2018 20
15 march 2019 150
12 january 2019 133
```

I don't know in advance, which cost, dates or how many rows I'll have.


Need a measure that takes this criteria into consideration:
- IF the month is the same as the max month, then, sum the cost of that month until the max day.

The cost for january 2018 would display 20 and all the remaining months would remain equal except for MARCH 2018, because it only sums cost until the max day of the max month (12).

[FONT=&quot]Basically, the year before will be affected, while the current year is always the original value.[/FONT]
[FONT=&quot]Is this possible to achieve with a measure?[/FONT]

https://i.imgur.com/sElSBIS.png
 
Last edited by a moderator:

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.

Forum statistics

Threads
1,214,400
Messages
6,119,284
Members
448,885
Latest member
LokiSonic

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top