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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
BrianMullen
Frequent Visitor

Help with Count

Hi, I am trying to create a score card to count of how many machines hit the target of 85%

 

The table on the right shows the Score % each machine has got, this is made up of runtime/downtime over several days. When i try to count the machines that have hit or above target (shown in the left table it shows two results for each machine a 0 and 1).

 

Can anyone help with this count?

 

Thanks in advance

 

count.JPG

2 ACCEPTED SOLUTIONS
v-tangjie-msft
Community Support
Community Support

Hi @BrianMullen ,

 

We can create a new measure [New At Target] to be placed on the visual object instead of the previous measure [At Target].

New At Target = SUMX(VALUES('Table'[Machine]),[At Target]) 

vtangjiemsft_0-1707372912987.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

BrianMullen
Frequent Visitor

Hi All,

 

Sorry for late reply i could not get the count to work in a card however i created a table and formatted to look like a score card

 

Score Counter = IF(COUNTROWS(VALUES(Mtable[Machine]))=1,
[Availability],
(SUMX(VALUES(Mtable[Machine]),
IF([Availability]>0.85,1,0))))
 
BrianMullen_0-1707917726400.png

 

View solution in original post

7 REPLIES 7
BrianMullen
Frequent Visitor

Hi All,

 

Sorry for late reply i could not get the count to work in a card however i created a table and formatted to look like a score card

 

Score Counter = IF(COUNTROWS(VALUES(Mtable[Machine]))=1,
[Availability],
(SUMX(VALUES(Mtable[Machine]),
IF([Availability]>0.85,1,0))))
 
BrianMullen_0-1707917726400.png

 

Hi @BrianMullen ,

 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or if you are still confused about it, please feel free to let me know.

 

Best Regards,

Neeko Tang

v-tangjie-msft
Community Support
Community Support

Hi @BrianMullen ,

 

We can create a new measure [New At Target] to be placed on the visual object instead of the previous measure [At Target].

New At Target = SUMX(VALUES('Table'[Machine]),[At Target]) 

vtangjiemsft_0-1707372912987.png

If the above one can't help you get the desired result, please provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples. It is better if you can share a simplified pbix file. Thank you.

 

Best Regards,

Neeko Tang

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

 

amustafa
Super User
Super User

Did you try to set a filter on the visual on field "At Target" = 1.





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

Proud to be a Super User!




Hi, yes i tried that. There are 68 machines and each has a 1 and a 0 so shows a score of 68 when only 24 have met the target

ValtteriN
Super User
Super User

Hi,

Here is one way to do this:

Data:

ValtteriN_0-1707296189644.png

 

Dax:

Test for 85 = SUMX('Table (22)',IF('Table (22)'[Value]>=0.85,1,0))


End result:
ValtteriN_1-1707296296902.png

 

I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!

My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/





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

Proud to be a Super User!




Thanks for the suggestion but it has not produced the count, it shows 163672

 

BrianMullen_0-1707302196530.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors