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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
WBarberena
Frequent Visitor

Line Graph Summing Separate Parameters

Greetings,

 

I found out PowerBI existed six months ago and now I am tasked with creating an implementation.  I love it so far.

 

My scenario: every day, five data points (including time) for 36 separate locations are generated. 

 

DateTimeLocationParamter 1Parameter 2Parameter 3Parameter 4
3/23/2023719LOCATION 12.640.272.300.006
3/23/2023813LOCATION 22.660.222.100.005
3/23/20231535LOCATION 32.550.232.300.007
3/23/20231650LOCATION 362.920.192.400.007

 

They are plotted on a line graph to track over time.

 

LineGraph.png

 

I have several slicers, one of which specifies parameters, that populates the graph with only the relevant data point per location.  The problem arises when two or more parameters are selected.  Instead of plotting separate points/lines for each parameter, the combination of selections is summed.  So for example, if I chose parameters 1, 2, and 3 for Location 1, instead of three plot points, 2.64, 0.27, and 2.30 respectively, the graph plots one point at 5.21.

 

I have other slicers that specify date ranges, locations, and even groups of locations.  Those works perfectly.  I used measures for each of the parameters because plotting the sums of the columns was giving me even more trouble.  Those measures all work fine:

Measure1 = SUM('Table'[Parameter1])

 

I don't know if the measure I use to plot them is the problem:

Parameter_Select =

SUMX (

    VALUES ( 'Sort_Parameters'[Parameter] ),

    SWITCH (

        'Sort_Parameters'[Parameter],

        "Paramter1", [Paramter1],

        "Paramter2", [Paramter2],

        "Paramter3", [Paramter3],

        "Paramter4", [Paramter4]

    )

)

 

I get no errors on any of my columns or measures.  I know 4 parameters for 36 locations yields 144 data points per day, but that's how it has to be (for now).  If someone could at least point me in the right direction I would appreciate it, as I have been looking for a solution and I'm not sure I'm even using the correct keywords.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@WBarberena , One way is unpivot the parameter to deal in a better way

Unpivot Data(Power Query): https://youtu.be/2HjkBtxSM0g

 

Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@WBarberena , One way is unpivot the parameter to deal in a better way

Unpivot Data(Power Query): https://youtu.be/2HjkBtxSM0g

 

Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.