Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in BI by (11.1k points)

I want to create a sum of 12 months' sales from last month of my date column.

and I had 3 years from 2016 to 2018 and I want to refresh the dashboard monthly by adding next month

How can I able to do it

1 Answer

0 votes
by (22.5k points)

I had a code

Rolling 12 Month Total :=
CALCULATE (
    SUM ( 'Table'[Sales] ),
    DATESBETWEEN (
        'Date'[Date],
        NEXTDAY ( SAMEPERIODLASTYEAR ( LASTDATE ( 'Date'[Date] ) ) ),
        LASTDATE ( 'Date'[Date] )
    )
)

If you want to learn more about Power BI, then read the Power BI Tutorial. Also, enroll in Power BI Training to become proficient in this BI tool.       

Related questions

0 votes
1 answer
asked Dec 24, 2020 in BI by Chris (11.1k points)
0 votes
1 answer
asked Feb 17, 2021 in BI by RohitSingh (2.6k points)
0 votes
1 answer
asked Mar 4, 2021 in BI by Chris (11.1k points)
0 votes
1 answer
asked Dec 31, 2020 in BI by Chris (11.1k points)

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...