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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
Sid25
Helper II
Helper II

how to create two line chart trend on same plot from single column

how to create two line trend from a single column,  I wanna create the line chart one for normal and another one for abnormal, I don't wanna create the two-column for this purpose.i have tried grouping of data but it didn't work the way I wanted.when i created using it grouping it is displaying wrong data.

the data simply looks like as following:

PatientIDplacePatientAgeMaleChildFemaleChildLMPDateResultResultstatusProc_DatecareRegDateReferredByPregWeeks
101utah281019-05-2017 00:00singleposnormal14-02-2018 00:00yes14-02-2018 00:00Doctor37
102virginia301020-05-2017 00:00singlesasabnormal15-02-2018 00:00no15-02-2018 00:00Self19
103vermont240021-05-2017 00:00divrocedneetnormal16-02-2018 00:00no16-02-2018 00:00Doctor16
104washington351022-05-2017 00:00marriedneetabnormal17-02-2018 00:00yes17-02-2018 00:00Doctor14
105west virginia361023-05-2017 00:00marriedneetnormal18-02-2018 00:00no18-02-2018 00:00Doctor15
106oregon230124-05-2017 00:00single paraentsasabnormal19-02-2018 00:00yes19-02-2018 00:00Doctor28
107ohio301025-05-2017 00:00marriedsasnormal20-02-2018 00:00No20-02-2018 00:00Doctor14
108north dakota200126-05-2017 00:00divrocedneetnormal21-02-2018 00:00yes21-02-2018 00:00Doctor22
109oklahoma220127-05-2017 00:00in a relationshipneetnormal22-02-2018 00:00No22-02-2018 00:00Doctor30
110new jersy230028-05-2017 00:00in a relationshipneetnormal23-02-2018 00:00yes23-02-2018 00:00Doctor10
111new mexico280129-05-2017 00:00in a relationshipneetnormal24-02-2018 00:00yes24-02-2018 00:00Doctor33
112north carolina220030-05-2017 00:00single paraentposabnormal25-02-2018 00:00No25-02-2018 00:00Doctor29
113montana260031-05-2017 00:00divrocedposnormal26-02-2018 00:00yes26-02-2018 00:00Doctor7
113navada230101-06-2017 00:00in a relationshipposabnormal27-02-2018 00:00No27-02-2018 00:00Doctor24
114mississipi220002-06-2017 00:00divrocedneetabnormal28-02-2018 00:00yes28-02-2018 00:00Doctor16
115kentucky250103-06-2017 00:00divrocedsasabnormal01-03-2018 00:00No01-03-2018 00:00Self24
116maine230004-06-2017 00:00in a relationshipsasnormal02-03-2018 00:00yes02-03-2018 00:00Doctor18
117indiana220005-06-2017 00:00single paraentsasabnormal03-03-2018 00:00No03-03-2018 00:00Self33
118hawaii250006-06-2017 00:00single paraentneetnormal04-03-2018 00:00yes04-03-2018 00:00Doctor33
119illinois220007-06-2017 00:00single paraentneetabnormal05-03-2018 00:00yes05-03-2018 00:00Self27
120florida281208-06-2017 00:00single paraentneetabnormal06-03-2018 00:00No06-03-2018 00:00Doctor25
121oregon230124-05-2017 00:00single paraentsasabnormal19-02-2018 00:00yes19-02-2018 00:00Doctor28
122ohio301025-05-2017 00:00marriedsasnormal20-02-2018 00:00No20-02-2018 00:00Doctor14
123north dakota200126-05-2017 00:00divrocedneetnormal21-02-2018 00:00yes21-02-2018 00:00Doctor22
124oklahoma220127-05-2017 00:00in a relationshipneetnormal22-02-2018 00:00No22-02-2018 00:00Doctor30
125new jersy230028-05-2017 00:00in a relationshipneetnormal23-02-2018 00:00yes23-02-2018 00:00Doctor10

 

and graphs look like this...

Screenshot_1.pngScreenshot_2.pngdataimage_1.png

the ultimate goal is to create the two-line chart for the normal and abnormal count as per their places.

could anyone please guide me through to get it done the best efficient way since I have been stuck to this problem for a quite long time. any help would be great.

1 ACCEPTED SOLUTION
AllisonKennedy
Super User
Super User

You don't need any Groups for this, Groups are for when you want to combine values (like 'in a relationship' combined with 'married' to group both as 'not single').
For this, you already have the 'normal' and 'abnormal' grouping that you want, so you just need to put Status in the Values AND put Status in Legend. You'll need to drag it from the fields pane twice. Then you should get the result you're looking for.

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

View solution in original post

2 REPLIES 2
AllisonKennedy
Super User
Super User

You don't need any Groups for this, Groups are for when you want to combine values (like 'in a relationship' combined with 'married' to group both as 'not single').
For this, you already have the 'normal' and 'abnormal' grouping that you want, so you just need to put Status in the Values AND put Status in Legend. You'll need to drag it from the fields pane twice. Then you should get the result you're looking for.

Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

amitchandak
Super User
Super User

@Sid25 , Not very clear.  Can you put a status on legend and check?

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Kudoed Authors