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

How to custom sort in a line graph when using percentages.

Hi all, I have an expression to see the percentage NetWeight per Size in a line graph. 1. Net Weight = SUM('Table'[NetWeight]) as expression 1 2. All Net Weight = CALCULATE([Net Weight],ALL('Table'[Size])) as expression 2 3. % Net Weight = DIVIDE ( [Net Weight] , [All Net Weight] , 0) as final expression to use in line graph. This works 100% as intended, but the moment I try and custom sort the my column with a RELATED column from another table, the results turn from individual percentages to 100% for all columns. What am I missing? Thanks,
1 ACCEPTED SOLUTION
John_V12
Frequent Visitor

Hi all, 

 

I found a post which solves my problem.

 

I added a variable and the final expression is as follows:

 

% Net Weight = VAR _Sort = SELECTEDVALUE('_Final Data 2015-2021'[CountFinal]) Return

DIVIDE ( [Net Weight] , [All Net Weight] , 0)
 
Thanks,

View solution in original post

2 REPLIES 2
John_V12
Frequent Visitor

Hi all, 

 

I found a post which solves my problem.

 

I added a variable and the final expression is as follows:

 

% Net Weight = VAR _Sort = SELECTEDVALUE('_Final Data 2015-2021'[CountFinal]) Return

DIVIDE ( [Net Weight] , [All Net Weight] , 0)
 
Thanks,

Thanks for your sharing.This may help people who encounter the same problem.

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.