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
changhong
Frequent Visitor

Sparkline in Table Visual

Hi,

 

I am trying to build the table below in Power BI but having issue to show the sparkline for different items and x-axis for 5 quarters(based on the selected quarter slicer).

changhong_0-1720109003252.png

I have tried to used an independent date table and calculation group, but still unable show the sparkline.

changhong_1-1720109163071.png

Attached the sample.pbix , please enlighten me on this.

9 REPLIES 9
Ashish_Mathur
Super User
Super User

Hi,

The problem is not 'building the sparkline" - that is a simple line chart.  Perhaps the challenge is going back 4 quarters from the choen quarter.  I have solved a similar question in the attached files.  Please study my solution there and adapt it to your data.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi @Ashish_Mathur ,

 

In the sample pbix file provided, I had the similar implementation but it couldnt work in the table with multiple row items that get populated with switch statement.

 

Here is my calculation group "Prev 5 Quarters". 

changhong_0-1720162014975.png

It works with line chart. 

changhong_1-1720162111621.png

But it does not works with the table visual. 

 

Best regards,

Chang Hong

As you can see in my file, it works fine even if you switch to a Table visual.  Please review my solution again.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,

 

I have followed your solution but the table visual still not working as expected. Can you please review my file? 

 

sample v2.pbix 

 

changhong_0-1720682072523.png

 

Best regards,

Chang Hong

 

I would not want to review your file.  Maybe someone else can help you.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

Hi @changhong ,
According to your description, you can't create a sparkline based on a quarter. you can refer to the following documentation to learn how to create a sparkline in power bi. please note the limitations of these operations.
Sparkline in Power BI - RADACAD
Create sparklines in a table or matrix in a report (preview) - Power BI | Microsoft Learn
Solved: Sparkline Visual - Microsoft Fabric Community

Best regards,
Albert He

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

Hi @Anonymous ,

 

From the first link you provided, below is the statement from the article
"If you have a custom Date table created by Power Query or DAX or any other way, you can use fields such as Year-Month combination, or Year-Quarter combination, or just Year to have fewer data points in the sparkline."

 

Best regards,

CH

changhong
Frequent Visitor

Hi @NaveenGandhi ,

 

I have provided the access.

Attached the same file in dropbox sample.pbix 

 

Regards,

CH

NaveenGandhi
Super User
Super User

Hi @changhong 

Please provide access to the PBIX so that i can have a look.


Thanks,
NG

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!

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