cancel
Showing results 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

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 ID Application Name Health Score 11220 XYZ App 100.00% 10200 ABC App 36% 20031 ZRT App 100.00% 23911 KLM App 100.00% 33329 OPR App 40.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
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!

4 REPLIES 4
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!

Frequent Visitor

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)?

Super User

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!

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?

Announcements

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.