cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted

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.

Sample data: https://www.dropbox.com/s/guw4ffb5aoxrrp3/PBI%20EXAMPLE.pbix?dl=0

 

Consulta cumulative week.JPG

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
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: | |
1 REPLY 1
Community Support Team
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: | |