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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Anonymous
Not applicable

How to ignore blanks when counting total percentage

Hi,

 

I'm trying to calculate the overall total percentage it takes for account to be resolved. The measure used to calculate the volume for 6 month is using calculated column, which checks if there is a 6 month since the account went into debt.

 

Calculated column:

EOM6 = if (eomonth(Query1[DateIntoDebt],6) > EOMONTH(today(),-1),1,0)

 

Volume measure:

Mth6 Vol = calculate(count(Query1[AccountID]),filter( Query1[Cure_Status_Enhanced] in {"Mth 1", "Mth 0", "Mth 2","Mth 3","Mth 4", "Mth 5","Mth 6"} && Query1[EOM6] = 0)
 
Percentage measure:
Mth6 %2 = Divide('Measures (2)'[Mth6 Vol],[Total Volume Excluding Zero and Latest],0)
 
As for some accounts the 6 month is not passed, the percentage column is null and overall total percentage shows incorrectly, 64.13% instead of 80's, see below.

 

nv1950_1-1650378949460.png

Is there any way of ignoring these blanks, so the overall total will be correct?

 

Thanks,

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try measure like

 

Mth6 %2 = calculate(Divide('Measures (2)'[Mth6 Vol],[Total Volume Excluding Zero and Latest],0), filter(Table,not(isblank([Mth6 Vol]))))

 

or

 

 

Mth6 %2 = calculate(Divide('Measures (2)'[Mth6 Vol],[Total Volume Excluding Zero and Latest],0), filter(values(Table[Month Year]),not(isblank([Mth6 Vol]))))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@Anonymous , Try measure like

 

Mth6 %2 = calculate(Divide('Measures (2)'[Mth6 Vol],[Total Volume Excluding Zero and Latest],0), filter(Table,not(isblank([Mth6 Vol]))))

 

or

 

 

Mth6 %2 = calculate(Divide('Measures (2)'[Mth6 Vol],[Total Volume Excluding Zero and Latest],0), filter(values(Table[Month Year]),not(isblank([Mth6 Vol]))))

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thank you. The second option worked for me. First one gave 100% for all the rows in the column.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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