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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Split line chart axis by categories

Hello,

 

I'd like to create a line chart like the following one :

 

SASVA_Split_LINECHART.png

 

The part I'm struggling with is the split of the X axis by the Month_Status.

I tried the solution with the "concatenate labels" disabled option but as you can see in the image below, the values are linked between the two status and no separated.

Is there any way to workaround this  ?

 

Thanks.

 

POWERBI_Split_LINECHART.PNG

1 ACCEPTED SOLUTION

Hi @Anonymous,

Based on my test, you could refer to below steps:

Create four measures:

Measure = CALCULATE(SUM(Table1[NN_Conversion Rate]),FILTER('Table1','Table1'[NN_Cop]="Customer"&&'Table1'[Month_Status]<>"Temporary"))
Measure2 = CALCULATE(SUM(Table1[NN_Conversion Rate]),FILTER('Table1','Table1'[NN_Cop]="Prospect"&&'Table1'[Month_Status]<>"Temporary"))
Measure3 = CALCULATE(SUM(Table1[NN_Conversion Rate]),FILTER('Table1','Table1'[Month_Status]="Temporary"&&'Table1'[NN_Cop]="Customer"))
Measure 4 = CALCULATE(SUM(Table1[NN_Conversion Rate]),FILTER('Table1','Table1'[Month_Status]="Temporary"&&'Table1'[NN_Cop]="Prospect"))

Result(create a Line and clustered column chart):

1.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-danhe-msft
Employee
Employee

Hi @Anonymous,

Could you please share me some sample data to have a test?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hello @v-danhe-msft,

 

Here's the data I'm testing on :

NN_Cop;Month_Status;NN_Month;NN_Conversion Rate
Customer;Final;1/01/2017;0,3151
Customer;Final;1/02/2017;0,3544
Customer;Final;1/03/2017;0,311
Customer;Final;1/04/2017;0,3284
Customer;Final;1/05/2017;0,374
Customer;Final;1/06/2017;0,3088
Customer;Final;1/07/2017;0,3602
Customer;Final;1/08/2017;0,3796
Customer;Final;1/09/2017;0,3434
Customer;Final;1/10/2017;0,3426
Customer;Final;1/11/2017;0,3508
Customer;Final;1/12/2017;0,3422
Customer;Temporary;1/12/2017;0,2857
Prospect;Final;1/01/2017;0,063
Prospect;Final;1/02/2017;0,0769
Prospect;Final;1/03/2017;0,0717
Prospect;Final;1/04/2017;0,061
Prospect;Final;1/05/2017;0,0826
Prospect;Final;1/06/2017;0,1076
Prospect;Final;1/07/2017;0,064
Prospect;Final;1/08/2017;0,0824
Prospect;Final;1/09/2017;0,0581
Prospect;Final;1/10/2017;0,112
Prospect;Final;1/11/2017;0,0638
Prospect;Final;1/12/2017;0,0414
Prospect;Temporary;1/12/2017;0,1538

Thank you very much.

 

 

Tus

Hi @Anonymous,

Based on my test, you could refer to below steps:

Create four measures:

Measure = CALCULATE(SUM(Table1[NN_Conversion Rate]),FILTER('Table1','Table1'[NN_Cop]="Customer"&&'Table1'[Month_Status]<>"Temporary"))
Measure2 = CALCULATE(SUM(Table1[NN_Conversion Rate]),FILTER('Table1','Table1'[NN_Cop]="Prospect"&&'Table1'[Month_Status]<>"Temporary"))
Measure3 = CALCULATE(SUM(Table1[NN_Conversion Rate]),FILTER('Table1','Table1'[Month_Status]="Temporary"&&'Table1'[NN_Cop]="Customer"))
Measure 4 = CALCULATE(SUM(Table1[NN_Conversion Rate]),FILTER('Table1','Table1'[Month_Status]="Temporary"&&'Table1'[NN_Cop]="Prospect"))

Result(create a Line and clustered column chart):

1.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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