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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

show values in different formats in a line chart

I have a table as this:

A should be shown as whole number;

B should be shown as percentage.

 

table2.png

 

I want to build a line chart like this:

result2.png

 

The problem is

 

if I use "Modeling"---"%", it will change both of the line.

 

If I use a measure as :

 

showpercent = IF(
CONTAINS('Table1','Table1'[Name],"B"),
FORMAT( SUM('Table1'[Values]), "0.00%"),
FORMAT(SUM('Table1'[Values]),"0")
)
 
The measure can not use in the line chart's value filed.
 
 
Please help, thank you!
 
 
1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hitatasherry,

I assume that your data sample might be similar to below

30.png

Then you could create measures like below

A = CALCULATE(SUM(F1[valeu]),FILTER(F1, F1[name]="A"))

B = CALCULATE(SUM(F1[valeu]),FILTER(F1, F1[name]="B"))

Then click on B and format this by click %

Capture20.PNG

Best Regards,
Zoe Zhi

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

View solution in original post

1 REPLY 1
dax
Community Support
Community Support

Hitatasherry,

I assume that your data sample might be similar to below

30.png

Then you could create measures like below

A = CALCULATE(SUM(F1[valeu]),FILTER(F1, F1[name]="A"))

B = CALCULATE(SUM(F1[valeu]),FILTER(F1, F1[name]="B"))

Then click on B and format this by click %

Capture20.PNG

Best Regards,
Zoe Zhi

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

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.