Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
I'm very new to Power BI, so please go easy on me here. I am trying to calculate scanning percentage based on branch. So my data would look something like this:
Branch Electronic Signature
ABC Y
DEF Y
ABC N
The idea is if product has an electronic signature, it would be a "Y", if not, it would be a "N". I created an additional column that says:
Scanned = IF (Query1[Electronic Signature] = "Y", 1, 0)
This works and allows me to turn the scanned into a numeric so I can figure out the percentage. So I want to figure out what percentage of stops were scanned, so I create another measure:
Scan Percent = sum(Query1[Scanned]) / countrows(Query1)
But I am getting data that matches nothing like I am expecting. What am I doing wrong? What is a better way to do this? Please help and I'm sorry for the newb question!
Solved! Go to Solution.
Hi @epmck11,
According to your description, you want to calculate the percent of signed records of current type, right?
Percent of current Branch =
CALCULATE (
COUNTA ( 'Table'[Electronic Signature] ),
'Table'[Electronic Signature] = "Y",
VALUES ( 'Table'[Name] ),
ALLSELECTED ( 'Table' )
)
/ CALCULATE ( COUNTROWS ( ALLSELECTED ( 'Table' ) ), VALUES ( 'Table'[Name] ) )
Percent of all Branch=
CALCULATE (
COUNTA ( 'Table'[Electronic Signature] ),
'Table'[Electronic Signature] = "Y",
VALUES ( 'Table'[Name] ),
ALLSELECTED ( 'Table' )
)
/ COUNTROWS ( ALLSELECTED ( 'Table' ) )
Regards,
Xiaoxin Sheng
Hi @epmck11,
According to your description, you want to calculate the percent of signed records of current type, right?
Percent of current Branch =
CALCULATE (
COUNTA ( 'Table'[Electronic Signature] ),
'Table'[Electronic Signature] = "Y",
VALUES ( 'Table'[Name] ),
ALLSELECTED ( 'Table' )
)
/ CALCULATE ( COUNTROWS ( ALLSELECTED ( 'Table' ) ), VALUES ( 'Table'[Name] ) )
Percent of all Branch=
CALCULATE (
COUNTA ( 'Table'[Electronic Signature] ),
'Table'[Electronic Signature] = "Y",
VALUES ( 'Table'[Name] ),
ALLSELECTED ( 'Table' )
)
/ COUNTROWS ( ALLSELECTED ( 'Table' ) )
Regards,
Xiaoxin Sheng
I'm very new to Power BI, so please go easy on me here. I am trying to calculate scanning percentage based on branch. So my data would look something like this:
Branch Electronic Signature
ABC Y
DEF Y
ABC N
The idea is if product has an electronic signature, it would be a "Y", if not, it would be a "N". I created an additional column that says:
Scanned = IF (Query1[Electronic Signature] = "Y", 1, 0)
This works and allows me to turn the scanned into a numeric so I can figure out the percentage. So I want to figure out what percentage of stops were scanned, so I create another measure:
Scan Percent = sum(Query1[Scanned]) / countrows(Query1)
But I am getting data that matches nothing like I am expecting. What am I doing wrong? What is a better way to do this? Please help and I'm sorry for the newb question!
@epmck11,
I use your measure to create the following table, does it return your expected result? If not, please post your desired result.
Regards,
Lydia
Yes, that would be my expected result.
@epmck11,
What is your current issue?
Regards,
Lydia
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
113 | |
82 | |
45 | |
42 | |
28 |
User | Count |
---|---|
182 | |
83 | |
70 | |
48 | |
45 |