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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
JoshP11
Helper II
Helper II

Creating measure to calculate percentage

Hello,

 

Wondering if anyone could help with creating a measure(s) to help calculate something.

 

Essentially, I want to know what percentage of 'Names' from 'Invoice Period' "November, December, January", have a total sum across those periods, of 0 for 'Data Usage', and 0 for 'Minutes Used'.

 

I'm guessing it would need to be done across 2 or 3 measures with various variables however still relatively new to PBI!

 

Any help would be appreciated!

 

Thanks,

Josh

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @JoshP11 ,

Based on my testing, please try the following methods:

1.Create the sample table.

vjiewumsft_0-1711533644074.png

2.Create the measure to calculate Data percentage.

 

Data_percentage = 
VAR Filtere_zero = CALCULATE(
    COUNTROWS('Table'),
    FILTER(
        ALLEXCEPT('Table','Table'[Name]),
        'Table'[Invoice Period] IN {"September", "October", "November"} && 'Table'[Data Usage] = 0
    )
)
VAR month_rows = CALCULATE(
    COUNTROWS('Table'),
    FILTER(
        ALLEXCEPT('Table', 'Table'[Name]),
        'Table'[Invoice Period] IN {"September", "October", "November"}
    )
)
VAR PercentageZeroUsage = 
DIVIDE(
    Filtere_zero,
    month_rows
)
RETURN
FORMAT(PercentageZeroUsage, "0.0%")
//PercentageZeroUsage

 

3.Create the measure to calculate Minute percentage.

 

Minute_percentage = 
VAR Filtere_zero = CALCULATE(
    COUNTROWS('Table'),
    FILTER(
        ALLEXCEPT('Table','Table'[Name]),
        'Table'[Invoice Period] IN {"September", "October", "November"} && 'Table'[Minutes Used] = 0
    )

)
VAR month_rows = CALCULATE(
    COUNTROWS('Table'),
    FILTER(
        ALLEXCEPT('Table','Table'[Name]),
        'Table'[Invoice Period] IN {"September", "October", "November"}
    )

)
VAR PercentageZero = 
DIVIDE(
    Filtere_zero,
    month_rows
)
RETURN
FORMAT(PercentageZero, "0.0%")

 

4.Drag the measure into the table visual. The result is shown below.

vjiewumsft_1-1711533741845.png

 

Best Regards,

Wisdom Wu

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

5 REPLIES 5
Anonymous
Not applicable

Hi @JoshP11 ,

Based on my testing, please try the following methods:

1.Create the sample table.

vjiewumsft_0-1711533644074.png

2.Create the measure to calculate Data percentage.

 

Data_percentage = 
VAR Filtere_zero = CALCULATE(
    COUNTROWS('Table'),
    FILTER(
        ALLEXCEPT('Table','Table'[Name]),
        'Table'[Invoice Period] IN {"September", "October", "November"} && 'Table'[Data Usage] = 0
    )
)
VAR month_rows = CALCULATE(
    COUNTROWS('Table'),
    FILTER(
        ALLEXCEPT('Table', 'Table'[Name]),
        'Table'[Invoice Period] IN {"September", "October", "November"}
    )
)
VAR PercentageZeroUsage = 
DIVIDE(
    Filtere_zero,
    month_rows
)
RETURN
FORMAT(PercentageZeroUsage, "0.0%")
//PercentageZeroUsage

 

3.Create the measure to calculate Minute percentage.

 

Minute_percentage = 
VAR Filtere_zero = CALCULATE(
    COUNTROWS('Table'),
    FILTER(
        ALLEXCEPT('Table','Table'[Name]),
        'Table'[Invoice Period] IN {"September", "October", "November"} && 'Table'[Minutes Used] = 0
    )

)
VAR month_rows = CALCULATE(
    COUNTROWS('Table'),
    FILTER(
        ALLEXCEPT('Table','Table'[Name]),
        'Table'[Invoice Period] IN {"September", "October", "November"}
    )

)
VAR PercentageZero = 
DIVIDE(
    Filtere_zero,
    month_rows
)
RETURN
FORMAT(PercentageZero, "0.0%")

 

4.Drag the measure into the table visual. The result is shown below.

vjiewumsft_1-1711533741845.png

 

Best Regards,

Wisdom Wu

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

Wilson_
Super User
Super User

Hi Josh,

 

Please check out the pinned thread in the forum to learn how to provide sufficient details to get your question answered. 🙂




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hi @Wilson_ thanks for the tip!

 

I've had a little read and im guessing all that is missing from my request for assistance is some sample data? I will work on attaching that to the post. 

if you can recommend anything else please let me know!


cheers

Hi JoshP11,

 

Yes, ideally in a mock pbix file. Otherwise, some sample data and what your model and expected result looks like would be super helpful. Thanks! 😄




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





@Wilson_  for some reason it won't allow me to upload the files to this comment?

Hopefully this screenshot gives a better idea on what I mean.

 

I'd basically like to a way to calculate what percentage of people, have a total sum of 0 for data AND a total sum of 0 for minutes, covering the invoice period of November, December, January.

 

JoshP11_0-1711360375414.png

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.