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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
elliejiang20
Microsoft Employee
Microsoft Employee

How to add only one column to matrix table to show trend line base on all other column values?

How to add only one column like below picture1) to matrix table In Power BI to show a trend line base on all other columns single values?
Require:
1) Red peak point on Trend column are the values from Sep'22(99.75%), Oct'22, Nov'22' Dec'22, Jan'23, Feb' 23. 

elliejiang20_1-1681159505432.png

2) I use 'Add SparkLine' in PBI, the visual with trend like below, the trend column added to every column. it is not correct.

elliejiang20_2-1681159782342.png

3) I also use 'Add SparkLine' in PBI and do an aggregation : Sum of TotalSales, then the SparkLine show up as per aggregation date, it is also not correct. Because I want sparkline show up base on every month percentage value which is not an aggregation value like Sum of..., but all single values of percentage.

elliejiang20_3-1681159861411.png

 

I didn't find out which visual provided outside of PBI neither.

 

----Can use below data for testing---
CREATE TABLE [dbo].[TableName](
[State] [nchar](10) NULL,
[Date] [date] NULL,
[TotalSales] [int] NULL
) ON [PRIMARY]

INSERT INTO [db name].[dbo].[tableName]
Values
('WA','2022-01-01',70),
('WA','2022-02-01',70),
('WA','2022-03-01',50),
('WA','2022-04-01',60),
('WA','2022-05-01',80),
('WA','2022-07-03',90),
('WA','2022-08-04',100),
('WA','2022-10-05',20),
('WA','2022-11-06',90),
('CA','2022-01-01',60),
('CA','2022-02-01',60),
('CA','2022-03-01',80),
('CA','2022-04-01',20),
('CA','2022-05-01',80),
('CA','2022-07-03',20),
('CA','2022-08-04',50),
('CA','2022-10-05',40),
('CA','2022-11-06',80),
('CA','2022-01-09',160),
('CA','2022-02-09',160),
('CA','2022-03-09',180),
('CA','2022-04-10',120),
('CA','2022-05-10',180),
('CA','2022-07-09',120),
('CA','2022-08-07',150),
('CA','2022-10-11',140),
('CA','2022-11-13',180)

Please help with this, thank you.

2 REPLIES 2
Anonymous
Not applicable

Hi @elliejiang20 

1.If you want to only display the only leave sparkline column and other columns. you need to remove the column name from the columns", otherwise, it will display the related value for each column value.

Then you can create four measure to for 4 quarters and then put them to the visual field

e.g 

Q1 = CALCULATE(SUM('Table (2)'[Column3]),QUARTER('Table (2)'[Column2])=1)
Q2 = CALCULATE(SUM('Table (2)'[Column3]),QUARTER('Table (2)'[Column2])=2)

vxinruzhumsft_1-1681280595996.png

 

2.Then you can create a measure to put it to the y-axis of sparkline column

e.g 

Measure 3 = DIVIDE(CALCULATE(SUM('Table (2)'[Column3]),QUARTER('Table (2)'[Column2])=SELECTEDVALUE('Table (2)'[Column2].[QuarterNo])),CALCULATE(SUM('Table (2)'[Column3]),ALLEXCEPT('Table (2)','Table (2)'[Column1])))

vxinruzhumsft_3-1681280860848.png

 

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

elliejiang20
Microsoft Employee
Microsoft Employee

Move forwarded, still use sparkline, now don't want highlight columns below, how to remove it, only leave sparkline column and other columns?

elliejiang20_0-1681168875789.png

 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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