cancel
Showing results for
Did you mean:
Member

## Comulative formula by week? is it possible?

Hi! I need to make a comulative formula by week, anybody got an idea how in my example?

I have two main problems:

1-. I want to use the column week of the Mineral Ext+ table not the calendar but I cant get a logic result.

2-. I need to hide months there are no data...my formula shows the other months.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support Team

## Re: Comulative formula by week? is it possible?

Hi @christianfcbmx .

Yes, it is possible. You can do cumulative by step condition filter on year and weeknum.

For example:

```Cumulative =
VAR currDate =
MAX ( calendar[Date] )
RETURN
CALCULATE (
SUM ( table[Amount] ),
FILTER (
ALLSELECTED ( table ),
YEAR ( table[date] ) = YEAR ( currDate )
&& WEEKNUM ( table[date], 1 ) <= WEEKNUM ( currdate, 1 )
)
)
```

Notice: please do mask on sensitive date before share and not attach whole data model table.(you only need to share key fields which formula required)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

For learning resources/Release notes, please visit: | |
Highlighted
Community Support Team

## Re: Comulative formula by week? is it possible?

Hi @christianfcbmx .

Yes, it is possible. You can do cumulative by step condition filter on year and weeknum.

For example:

```Cumulative =
VAR currDate =
MAX ( calendar[Date] )
RETURN
CALCULATE (
SUM ( table[Amount] ),
FILTER (
ALLSELECTED ( table ),
YEAR ( table[date] ) = YEAR ( currDate )
&& WEEKNUM ( table[date], 1 ) <= WEEKNUM ( currdate, 1 )
)
)
```

Notice: please do mask on sensitive date before share and not attach whole data model table.(you only need to share key fields which formula required)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin Sheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

For learning resources/Release notes, please visit: | |