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
NISHA_S
Resolver I
Resolver I

percentage measure is not correct

MIXED.PNG

this is a sample report contain some columns...In measure i have two types of calculation values ....count values plus precenatge values...If the category is percentage of total ,Measure will be percenatge values else count values...ie...I faced a problem while calcualting percentage ....If type is Concrete Sapiens, i want to calcualte percentage based on the

count of concrete ->sapiens(8) /count of combined ->sapiens (18) ....currently my perecnatge calcualtion is not correct....Is it possible?

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@NISHA_S 
You can create the following measure using format(), see attached pbix for detail.

 

Measure =
var concrete_sapiends_percent = FORMAT(MAX([Count])/CALCULATE(SUM('Table'[Count]),FILTER(ALL('Table'),[Type]="Sapiens")),"Percent")
Return IF(MAX('Table'[Type])="Concrete Sapiens",concrete_sapiends_percent,MAX('Table'[Count])
 

V-pazhen-msft_1-1617159836842.png

 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
V-pazhen-msft
Community Support
Community Support

@NISHA_S 
You can create the following measure using format(), see attached pbix for detail.

 

Measure =
var concrete_sapiends_percent = FORMAT(MAX([Count])/CALCULATE(SUM('Table'[Count]),FILTER(ALL('Table'),[Type]="Sapiens")),"Percent")
Return IF(MAX('Table'[Type])="Concrete Sapiens",concrete_sapiends_percent,MAX('Table'[Count])
 

V-pazhen-msft_1-1617159836842.png

 


Paul Zheng _ Community Support Team
If this post helps, please Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Please provide sample data in usable format (not as a picture) .

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.