Forum Discussion
different decimal places in one Line chart
I have a Line chart with 2 legent values.
How can I show one line with 1 decimal place and the one line with 3 decimal places in this chart?
10 Replies
- ribisht17
Super User
Please check Solved: Dynamically use different measure with different d... - Microsoft Power BI Community
Regards,
Ritesh
Mark my post as a solution if it helped you| Munde and Kudis (Ladies and Gentlemen) I like your Kudos!! !!
My YT Channel Dancing With Data !! Connect on Linkedin !!Power BI for Tableau Users- Wei2
Helper I
but format return text type instead of numeric type.
Here is my measure
Value_new =IF(CONTAINS('table1', 'table1'[column1],"A"),FORMAT(FIXED(SUM('table1[column2]),1,True),"#0,0"), FORMAT(FIXED(SUM('table1'[Column2]),3,1),"#0,000"))I want to show data lable in my line chart. - Wei2
Helper I
Format returns Text type. But I use VALUE in FORMAT, data only show 2 decimals.
- v-cazheng-msft
Community Support
Hi Wei2,
You may try this solution.
Here is the sample data.
Create a Calculated column.
FormatedNumeric = IF ( CONTAINSSTRING ( 'Table'[Product], "A" ), ROUND ( 'Table'[Sales], 1 ), ROUND ( 'Table'[Sales], 3 ) )Create a Measure.
Total = SUM('Table'[FormatedNumeric])Then, the result looks like this.
Also, attached the pbix file.
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems on it, please feel free to let me know. Thanks a lot!
Best Regards,
Community Support Team _ Caiyun
- Wei2
Helper I
I know what happened. I need to change the display unit to None and it worked.
The default is Auto.
Thank you for your great help.
- v-cazheng-msft
Community Support
Hi Wei2,
That’s great! Thanks for your reply!
Could you please help mark the solution by Accept as Solution to help the other members find it more quickly. Thanks in advance!
Best Regards,
Community Support Team _ Caiyun
- Wei2
Helper I
Thanks. Does that mean that I cannot do it in measure? I need to create a new column for it?
Also actually I don't need to do any calculation. The reason I used SUM is that I thought I can use FORMAT or ROUND for it. The thing is that I just need to show data as it is with different decimal? May I know what I can do it?
My table is like:
Journal Metric 2015 2016 2017 2018 Biophysical Journal Citescore 6.7 6.4 6.3 6.2 Biophysical Journal Impact Factor 3.972 3.632 3.656 3.495