Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
hii
I want to find last 12 month sum from selected month if i am in Dec -17 then last 12 month person count (count of personnel number) again same for nov-17 is selected then that month and last 12 month count of personnel number count sum like wise .......
Solved! Go to Solution.
For this to work, you need a SERIAL ID column for the months in your calendar table.
A serial ID will start at 1, but will increase by 1 for each month, and NOT reset after 12.
For example, if your calendar starts in January 2016, then that month ID = 1. January 2017's month ID = 13.
Assuming that column exists in your calendar table, (and the column is called [MonthID]), this is the formula:
Measure = CALCULATE ( SUM ( TableName[ColumnName] ), FILTER ( ALL ( Calendar ), Calendar[MonthID] <= MAX ( Calendar[MonthID] ) && Calendar[MonthID] >= MAX ( Calendar[MonthID] ) - 11 ) )
For this to work, you need a SERIAL ID column for the months in your calendar table.
A serial ID will start at 1, but will increase by 1 for each month, and NOT reset after 12.
For example, if your calendar starts in January 2016, then that month ID = 1. January 2017's month ID = 13.
Assuming that column exists in your calendar table, (and the column is called [MonthID]), this is the formula:
Measure = CALCULATE ( SUM ( TableName[ColumnName] ), FILTER ( ALL ( Calendar ), Calendar[MonthID] <= MAX ( Calendar[MonthID] ) && Calendar[MonthID] >= MAX ( Calendar[MonthID] ) - 11 ) )
@Anonymous thank you this works very well....
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
56 | |
55 | |
54 | |
37 | |
29 |
User | Count |
---|---|
77 | |
62 | |
45 | |
40 | |
40 |