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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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/

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/

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_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.