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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
saranp780
Helper III
Helper III

How to create a measure for cumulative a line chart?

I have got data like this.....

 

StatusTitleName SurnameDeparmentLicense TypeAdding Date
ActiveMr.SusanSimonSaleOffice 365 Enterprise E316/9/2016
ActiveMr.TennassiKooSaleOffice 365 Enterprise E316/9/2016
ActiveMr.AndrewSundaenSaleOffice 365 Enterprise E317/9/2016

 

My requirement is to calculate from their license. If it is no longer licensed, the status will change to inactive.

 

The Active still show on the status means these licenses are available. and continue using. In this case, there are three data from 2016 in the table. I want to get 3 in 2016, 3 in 2017 and 3 in 2018. (follow this picture). 

 

Untitled.jpg

 Then if new user registration in 2019 increase 3 licenses It will be 6 licenses in 2019. (Not in this case)

Now I used this measure

Count of License Type RunningTotal By Adding Date = 
CALCULATE(
	COUNTA('Community'[License Type]),
	FILTER(
		ALLSELECTED('Community'[Adding Date]),
		ISONORAFTER('Community'[Adding Date], MAX('Community'[Adding Date]), DESC)
	)
)

 

And my result only shows 2016

line.jpg

 

Please give me an advice and suggest the measure that I have to do. Thank you all for your answer.

3 REPLIES 3
Anonymous
Not applicable

HI @saranp780,

 

Maybe you can use below measure to calculate available license amount based on calendar date:

Count of License Type RunningTotal By Adding Date =
VAR license_range = 24 //month amount
VAR calendar_date =
    SELECTEDVALUE ( calendar[Date] )
RETURN
    CALCULATE (
        COUNTA ( 'Community'[License Type] ),
        FILTER (
            ALLSELECTED ( 'Community'[Adding Date] ),
            calendar_date
                IN CALENDAR (
                    'Community'[Adding Date],
                    DATE ( YEAR ( 'Community'[Adding Date] ), MONTH ( 'Community'[Adding Date] ) + license_range, DAY ( 'Community'[Adding Date] ) )
                )
        )
    )

Notice: please use calendar date as axis and measure as value. 

 

Regards,

Xiaoxin Sheng

I did it on you giving measure but the result can't display. Could you please, capture a screenshot? @Anonymous

Anonymous
Not applicable

HI @saranp780,

 

 

Can you please share a pbix file so I can test my formula with sample data?

 

Regards,

Xioaxin Sheng

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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