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
mc_henrique
New Member

Dinamically change formatting of data labels in a line chart

Hi,

 

I'm using the solution provided in this post (Dynamically change the information within a visual via slicer), however I'm facing an issue with the formatting of the data labels.

 

In my case, I'm building a trend line chart (month in X-axis), and my Y-axis is the dynamic metric that I created based on the post. The metric I created mix Percentages and Currency values, so I would like to change automatically the data value that shows on each point in time to 0.0% or $0M. Since in the blog post the values are all the same type, there's no issue. 

 

I've tried using the dax FORMAT formula, but it is converting the final metric to text, and then the line shows all blank.

 

Is there any workaround?

 

Thanks a lot!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@mc_henrique , In case you are using measure slicer, then you should try to use calculation groups

 

calculation groups
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/

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

3 REPLIES 3
amitchandak
Super User
Super User

@mc_henrique , In case you are using measure slicer, then you should try to use calculation groups

 

calculation groups
https://www.sqlbi.com/blog/marco/2020/07/15/creating-calculation-groups-in-power-bi-desktop/

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

Hi @amitchandak ,

 

I was able to figure it out, and they worked like a charm! Thanks a lot!

Hi @amitchandak ! Thanks a lot for your answer. This is something I didn't know about.

 

However, how exactly could I use calculation groups? I was trying to use it, but all the examples I see they vary the X-axis, for example, with time intelligence for calculating PY, YOY and others. 

In my case, the time frame is fixed (fiscal month). What is varying are the measures and its types. So I have for example # of visits, Conversion % and Sales Amount $. Each one has it's type, integer, percent and currency, but when selecting the measure to change the line chart, the type is the same for all the measures.

 

I'm not sure how I could use calculations group for this case, if you could me provide me some more context, I would really appreciate!

 

Thanks a lot!

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