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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
vcb_001
Frequent Visitor

Creation of a measure regarding count of percentages in a table.

Hi,

 

I'm using a table visual in my dashboard as it is represented in the below, but it is not a data or table that are currently available. I'm just using two columns from a table and 1 measure which has been done by another formula based on a different table's data.

 

The table looks like this:

Application IDApplication NameHealth Score
11220XYZ App100.00%
10200ABC App36%
20031ZRT App100.00%
23911KLM App100.00%
33329OPR App40.00%

 

What I would like to do is quite straigthforward but, it didn't work with the combination of CALCULATE and FILTER formulas. I need to create a measure which counts number of 100.00% Applications to see how many 'fully' healthy applications are there in the table instead of only showing them in the Power BI table.

 

Additionally, another measure is also needed to calculate unhealthy ones which are basically 'not' %100.

1 ACCEPTED SOLUTION
ERD
Super User
Super User

@vcb_001 , try this measure:

healthy amt =
VAR t = ADDCOLUMNS ( VALUES ( 'Table'[Application ID] ), "score", [Health Score] )
RETURN
    COUNTROWS ( FILTER ( t, [score] = 1 ) )

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

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

View solution in original post

4 REPLIES 4
ERD
Super User
Super User

@vcb_001 , try this measure:

healthy amt =
VAR t = ADDCOLUMNS ( VALUES ( 'Table'[Application ID] ), "score", [Health Score] )
RETURN
    COUNTROWS ( FILTER ( t, [score] = 1 ) )

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

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

vcb_001
Frequent Visitor

Thank you for your valuable answer!

Could you please also help me to adapt this measure for the ones which are below 100% and above 75% as a new category (new measure)?

 

lower amt =
VAR t = ADDCOLUMNS ( VALUES ( 'Table'[Application ID] ), "score", [Health Score] )
RETURN
    COUNTROWS ( FILTER ( t, [score] < 0.75 ) )
mid amt =
VAR t = ADDCOLUMNS ( VALUES ( 'Table'[Application ID] ), "score", [Health Score] )
RETURN
    COUNTROWS ( FILTER ( t, [score] < 1 && [score] > 0.75 ) )

 

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

Check out my latest demo report in the data story gallery.

Stand with Ukraine!


Here are official ways you can support Ukraine financially (accounts with multiple currencies):
1) Support the Armed Forces of Ukraine: https://bank.gov.ua/ua/about/support-the-armed-forces
2) Come Back Alive foundation: https://www.comebackalive.in.ua/

Thank you!

vcb_001
Frequent Visitor

Hello again,

 

I greatly appreciate what you've done so far for this measure and it supported a lot to improve the structure of my dashboard. I thought for a new improvement based on the same logic you've shared in the above which is basically a filter that includes 3 categories for example, 'Fully Healthy', 'Mid Healthy' and 'Unhealthy'. How could I do that, Can you please help me either to create this custom column as well as the relevant filter based on that one?

Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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