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
DschroyenBruss
New Member

How to build this check?

So I am trying to build a quality report. I'm importing a set of sharepoint data with colums that have one the following values:

  • OK
  • NOK
  • DNA (doesn't apply)

So what I want my created colmun to do is:

  1. Check the selected colmuns
  2. Count the number of OK and NOK (ignore the doesn't applies)
  3. Produces a % that represents the % of OK's compared to the OK's and NOK's (so "count OK" / ("count OK+ count NOK) )

My main issue being that I only have expercience writting things like this in Excel. My employer is looking into providing me with a Power BI training but it's going to take sometime before I'm in that training.... Patience is not my virtue.... Can anyone provide me with a good tutorial to writing this kind of code in power bi query? 

1 REPLY 1
AilleryO
Memorable Member
Memorable Member

Hi,

 

Not sure about what you mean by check, but at least for the count it will be something like :

Create a measure

Count of OK = CALCULATE ( COUNT( [YourColumn] ) , ALL( [YourColumn] ) , [YourColumn]="OK" )
Count of NOK = CALCULATE ( COUNT( [YourColumn] ) , ALL( [YourColumn] ) , [YourColumn]="NOK" )

Count of NOK + OK = CALCULATE ( COUNT( [YourColumn] ) , ALL( [YourColumn] ) , [YourColumn]<>"DNA" )

 

The ALL( [YourColumn] )  is to remove the filter from the table so I assumed you'll dispaly the measure in a table with  [YourColumn] placed on lines If not adjust the ALL according to the filter you need to remove.

 

Tell us if it works

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.