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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Kaly999
New Member

Require help in plotting a chart

Hello this is Kalyan. I am new to PowerBI. 

I am trying to plot this data into charts of the visual types shown below with those respective filters. 

 

Data.png

51.png52.png

 

 

 

 

 

 

 

 

53.png 

Kindly suggest me how this can be done. Thanks in advance. 

Kalyan, Hyderabad. 

1 ACCEPTED SOLUTION
Ritaf1983
Super User
Super User

Hi @Kaly999 
You can achieve  the desired result by using separate measures for every group, field parameter, and "generated manually " legend

Ritaf1983_4-1700980223490.png

Ritaf1983_5-1700980603433.pngRitaf1983_6-1700980626140.png

 

 

The measures that you will need:

Value A-1 = CALCULATE(sum('Table'[Value A]),'Table'[Parameter]="Parameterl")
Value A-2 = CALCULATE(sum('Table'[Value a]),'Table'[Parameter]="Parameter2")
Value B-1 = CALCULATE(sum('Table'[Value b]),'Table'[Parameter]="Parameterl")
Value B-2 = CALCULATE(sum('Table'[Value b]),'Table'[Parameter]="Parameter2")
After creating the measures you can create and modify filed parameters:
Ritaf1983_2-1700979478514.pngRitaf1983_3-1700979530798.png

 

Then you need to add a calculated column for parameters that will be used at the slicer :

Parameters = if('Parameter'[Parameter]="Value A-1" ||'Parameter'[Parameter]="Value B-1", "Parametr1","Parametr2")
Ritaf1983_7-1700980885397.png

The next steps are on the visuals :

1. Put the parametrs column on the slicer:

Ritaf1983_8-1700980972762.png

2. On the graph put a date on the axis , the parameter of measures ( not the same column that we took to the slicer ) on the Y-Axis 

Ritaf1983_9-1700981099268.png

Modify the colors :

Ritaf1983_10-1700981140118.png

create a legend i did it with shapes and text boxes, you can design it much better on PowerPoint and add it as an image

Ritaf1983_11-1700981276636.png

group the construction and put it on the legend to the original legend of the gra[h with 4 values (make sure that the generated legend has a background color)

Ritaf1983_12-1700981394062.pngRitaf1983_13-1700981524917.png

Pbix is attached

 

If this post helps, then please consider Accepting it as the solution to help the other

members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

View solution in original post

3 REPLIES 3
Ritaf1983
Super User
Super User

Hi @Kaly999 
You can achieve  the desired result by using separate measures for every group, field parameter, and "generated manually " legend

Ritaf1983_4-1700980223490.png

Ritaf1983_5-1700980603433.pngRitaf1983_6-1700980626140.png

 

 

The measures that you will need:

Value A-1 = CALCULATE(sum('Table'[Value A]),'Table'[Parameter]="Parameterl")
Value A-2 = CALCULATE(sum('Table'[Value a]),'Table'[Parameter]="Parameter2")
Value B-1 = CALCULATE(sum('Table'[Value b]),'Table'[Parameter]="Parameterl")
Value B-2 = CALCULATE(sum('Table'[Value b]),'Table'[Parameter]="Parameter2")
After creating the measures you can create and modify filed parameters:
Ritaf1983_2-1700979478514.pngRitaf1983_3-1700979530798.png

 

Then you need to add a calculated column for parameters that will be used at the slicer :

Parameters = if('Parameter'[Parameter]="Value A-1" ||'Parameter'[Parameter]="Value B-1", "Parametr1","Parametr2")
Ritaf1983_7-1700980885397.png

The next steps are on the visuals :

1. Put the parametrs column on the slicer:

Ritaf1983_8-1700980972762.png

2. On the graph put a date on the axis , the parameter of measures ( not the same column that we took to the slicer ) on the Y-Axis 

Ritaf1983_9-1700981099268.png

Modify the colors :

Ritaf1983_10-1700981140118.png

create a legend i did it with shapes and text boxes, you can design it much better on PowerPoint and add it as an image

Ritaf1983_11-1700981276636.png

group the construction and put it on the legend to the original legend of the gra[h with 4 values (make sure that the generated legend has a background color)

Ritaf1983_12-1700981394062.pngRitaf1983_13-1700981524917.png

Pbix is attached

 

If this post helps, then please consider Accepting it as the solution to help the other

members find it more quickly

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Thanks @Ritaf1983  for the solution. 
The solution seems very lengthy one. 

The query i posted earlier is a sample of my actual data. My actual data has 5 Variables & 40 Items.
(in relation with my previous query, Parameters have been replaced with Variables & Values with Items respectively, to avoid confusion with DAX terminology).

 

Kaly999_3-1703144399075.png

(5 Variables including Date)

 

So here is a snapshot of my expectation / probable solution.

 
Kaly999_1-1703144134575.png

The Variables need to be multiselected. Date can be a single value or a range.

 

Please suggest/guide me with the approach/steps. 

Thanks in advance

Kalyan

Hi @Kaly999 
Unfortunately, there is no other option, because we don't have a functionality of conditional formatting for colors at the line chart.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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