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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
Pbi07
Helper V
Helper V

Calculate percentage issue

Having trouble with my calculation of percentage. 

 

Table contains the Acct codes with Amount. Following measure is for calculating the % of puchase amount ( Acct code = 1000) on each accounts .  

Basically, dividing the transaction amount of each account codes  by the transaction amount with acct code = "1000" 

 

Total Purch = calculate(sum('Transaction'[Amount]),'Transaction'[Acct Code]="1000")
% of Purch = DIVIDE ( SUM('Transaction'[Amount]),[Total Purch], 0)
 
Calculation does show the % as below, but i want to exclude the acct Code - 1000 and show the rest. But when i use the filter the calculation returns 0 
Pbi07_0-1712255302373.png

I tried using ALL , but did not work. Attaching the pbix. Expected results is above, but need to exclude 1000 and show the rest of 3 acct codes. 

 

https://drive.google.com/file/d/1z5bzSReY4-hJpn5FdFiHEvUj6sPn4oOs/view?usp=sharing

 

 

 
 
 
 
 
 
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Pbi07 , try like

 

% of Purch = DIVIDE ( calculate(SUM('Transaction'[Amount]),filter('Transaction', 'Transaction'[Acct Code]<> "1000")),[Total Purch], blank() )

 

 

View solution in original post

2 REPLIES 2
Pbi07
Helper V
Helper V

Thanks @amitchandak 

amitchandak
Super User
Super User

@Pbi07 , try like

 

% of Purch = DIVIDE ( calculate(SUM('Transaction'[Amount]),filter('Transaction', 'Transaction'[Acct Code]<> "1000")),[Total Purch], blank() )

 

 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

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

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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