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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
saranp780
Helper III
Helper III

How to create a customize line chart?

I have some data like this.

 

StatusTitleName SurnameDeparmentLicense TypeAdding Date
ActiveMr.SusanSimonSaleOffice 365 Enterprise E316/9/2016
ActiveMr.TennassiKooSaleOffice 365 Enterprise E316/9/2016
ActiveMr.HenryWuSaleOffice 365 Enterprise E316/9/2016
ActiveMr.OvenShewSaleOffice 365 Enterprise E316/9/2016
ActiveMr.VinBenzenceSaleOffice 365 Enterprise E316/9/2016
ActiveMr.LouisLeeSaleOffice 365 Enterprise E316/9/2016
ActiveMr.AdamYoungSaleOffice 365 Enterprise E316/9/2016
ActiveMr.Peter ParkerSaleOffice 365 Enterprise E316/9/2016
ActiveMr.SamSmileSaleOffice 365 Enterprise E316/9/2016
ActiveMr.VVV SharkSaleOffice 365 Enterprise E316/9/2016
ActiveMr.SSJandeeSaleOffice 365 Enterprise E316/9/2016
ActiveMr.AndrewSundaenSaleOffice 365 Enterprise E317/5/2018

 

I grabbed this data and create a Line chart and the result for the data was......

 

line.jpg

 

But I want the data to display like this; 2016 = 11 and 2018 = 12

 

How can I do this graph to show what I want?  (The 11 and 12 are from count from each row) Just so you know

 

Like in the picture I've created in another program(Following picture)

 

 

 

following this image

Untitled.jpg

 

Anybody, please help me. It's a kind of sum data of 2016 and when 2018 then sum of 2016+2018. But when I put my logic in the measure I can't create a line chart so now, I don't know how to create a chart that my requirement wants to know how many users per category that register all the year as a trend?

 

Thank you for all answer.

 

 

 

1 ACCEPTED SOLUTION
MariaP
Solution Supplier
Solution Supplier

HI @saranp780

 

Power BI has inbuilt 'Quick Measure's which writes code for you.

Add this as a Measure in your table and drag to the Values area. Use your 'Adding Date' as the Axis. 

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)
	)
)

RunningTotalCount.PNG

 

Your results should work as required,

 

Cheers.

 

 

View solution in original post

4 REPLIES 4
Ashish_Mathur
Super User
Super User

Hi,

 

I have solved the same problem here.  Please refer to my PBI file which i shared with you there.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
MariaP
Solution Supplier
Solution Supplier

HI @saranp780

 

Power BI has inbuilt 'Quick Measure's which writes code for you.

Add this as a Measure in your table and drag to the Values area. Use your 'Adding Date' as the Axis. 

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)
	)
)

RunningTotalCount.PNG

 

Your results should work as required,

 

Cheers.

 

 

I solved my problem with your giving solution. Thank you.

prateekraina
Memorable Member
Memorable Member

Hi @saranp780,

 

What have you placed in Axis and Value of the visual?

Also, have you correctly assigned data types?

 

Prateek Raina

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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