Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
uie07923
Frequent Visitor

KPI - Calculate result from month and accumulate throughout the year

Hello colleagues!

 

I have a KPI that measures a relation of the number of people in the company by the end of month and the number of occurrences of an activity within that certain month.

It divides the occurrences / number of people.

To bring the accumulated result for more than 1 period, it needs to make that calculation for each month individually and sum the result.

 

However, as I have a list of people for each month, doing a countrows sums all the number of people of all months - not bringing the correct result.

 

Can you please please support on the measure of advices?

 

2022-05-04 09_40_05-Window.png

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @uie07923 ,

 

You could create a measure like below:

measure =
IF (
    ISINSCOPE ( 'Table'[date].[Month] ),
    [Fluctuation],
    SUMX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[date].[Year] = SELECTEDVALUE ( 'Table'[date].[Year] )
        ),
        [Fluctuation]
    )
)

 

Best Regards,

Jay 

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @uie07923 ,

 

You could create a measure like below:

measure =
IF (
    ISINSCOPE ( 'Table'[date].[Month] ),
    [Fluctuation],
    SUMX (
        FILTER (
            ALL ( 'Table' ),
            'Table'[date].[Year] = SELECTEDVALUE ( 'Table'[date].[Year] )
        ),
        [Fluctuation]
    )
)

 

Best Regards,

Jay 

amitchandak
Super User
Super User

@uie07923 , not very clear, if you have date you can use datesytd

 

YTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESYTD('Date'[Date],"12/31"))

 

or

 

YTD= CALCULATE(sum('Table'[Qty]), FILTER(ALL('Date'),'Date'[Year]=max('Date'[Year]) && 'Date'[Month] <= Max('Date'[Month]) ))

 

 

Cumulative across year


Cumm Sales = CALCULATE(SUM(Sales[Sales Amount]),filter(all('Date'),'Date'[date] <=max('Date'[date])))

 

If this does not help
Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors