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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

How to show a line chart and scatter chart in same visual having a special data model

Hello!

I am working on a special report that has some challenges. First I need to explain the data model before I go any further. I have a disconnected table A having static values (average weights, parameter 1, parameter 2, parameter 3). I have also a fact table B having average weights and parameter X, Y, Z and so, but also keys to dimensions.

 

data model.png

Example of Table A which can be unpivoted (Type A-D). In the data model table A is LinechartData2_Unpivot

 

Avg weightType AType BType CType D
1001,41,01,01,0
2501,42,02,02,3
5002,63,43,56,7
7503,33,93,98,2
10003,94,34,59,9


Table B (can also be unpivoted on K-Factor, Fat and Pigment) 

 

Date KeyProject NameLocationAvgWeightConditionFactorFatPigmentCageSampleDate
20191104Project ALocation 1045611,2374775747016317,858,14M22019-11-04 15:00:00.000
20191104Project ALocation 1045611,2374775747016317,858,14M42019-11-04 15:00:00.000
20191104Project ALocation 1045611,2374775747016317,858,14M12019-11-04 15:00:00.000
20191104Project ALocation 1045611,2374775747016317,858,14M32019-11-04 15:00:00.000
20191101Project BLocation 2027751,3892924461509419,194,35032019-11-01 10:35:36.000

 

For simplicity I have created simples dimensions with only one column. The dimensions are only related to table B (ScatterchartData2_Unpivot)

 

In the same visual I want to show data from the static table A as a line chart and a set of scatter charts from the table B. I want to select which line chart I want to use from one (disconnected) slicer, and also which scatter charts from an other disconnected slicer. AND I also want to select dimensions from other slicers to reduce data from table B

 

The visual has average weight on the X axis and Value on the Y axis. There are two problems here. 

1) how can I model these two tables in such way that I can select from the slicers like I described. I don't want to extend the static table A with dummy data to adjust it to table B and then join them.

 

2) how can I show the line chart and scatter plots in the same visual dynamically? I want to show one line chart and one or more scatter chart series in the visual.


I hoped I could add a demo pbix file to this post I don't know if that is possible. I add a picture in steadcase.png

 

Thanks to you all that spend time on me 

 

regards Geir

4 REPLIES 4
Anonymous
Not applicable

Hi @Anonymous ,

Nope, it is impossible to use normal visuals to achieve dynamic visual graphs in the same visual.

I'd like to suggest you create an R visual with if statement to plot line graph or scatter graph based on slicer selections.

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Hello again.

 

Yes I have figured out that. I guess I can manage to use R. The thing there is how I can manage to dynamically add dataset.

 

But the other interesting thing here is how to data model the case. I have unrelated table and a related wider table but with common columns in average weight , attribute and value. I can create a calcualted table to append these dataset into one, but that means I have to extend the smaller dataset first. This will make my report rather messy when I want to filter on my dimensions. The result will be that I have a dummy element in all dimensions I need to selecet together with the actual element. I hope somebody know how to solve this data model issue

Anonymous
Not applicable

Hi @Anonymous,

I'd like to suggest you to use summarize function to create calculated tables to extract and aggregate related table fields. (use calculated table to pre-summarize related fields)
After these, you can extract original tables key fields and merge them to one as a bridge table to link these summarize tables. (build bridge table for relationship mapping and analysis)

In addition, if your data source are from SQL or other data sources that support to direct send 'T-SQL' query as optional parameters to get data.  I'd like to suggest you use 'T-SQL' query to summarize related fields to one for analysis on database side, it should have better performance than do it on power bi side.
Regards,

Xiaoxin Sheng

Anonymous
Not applicable

Obs How do I add a PBIX file to this post?

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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