Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello connection,
Below measure display the value of "dept1" only. We can write different measure for other department.
It is possible to write the single measure to get all different department percentage, Is this achievable?
Below is the "dept1" measure. Instead of writing different measure for different department can we write in single measure?
Measure =
VAR _A =
CALCULATE(
COUNTA( 'Table'[names] ),
FILTER( ALL( 'Table' ), 'Table'[names] = "dept1" )
)
VAR _B =
CALCULATE( COUNTA( 'Table'[names] ), ALL( 'Table' ) )
RETURN
_A / _B
Thank in advance.
Solved! Go to Solution.
Measure = IF (HASONEVALUE('Table'[names]),
VAR cur_name = VALUES( 'Table'[names])
RETURN DIVIDE(
CALCULATE( COUNTA( 'Table'[names]), ALL( 'Table' ), 'Table'[names] = cur_name )
,CALCULATE( COUNTA( 'Table'[names]), ALL( 'Table' ))
)
)
Hi @BidyaSingha
Please try
Measur =
VAR _A =
COUNTROWS ( 'Table' )
VAR _B =
CALCULATE ( COUNTROWS ( 'Table' ), ALL ( 'Table'[names] ) )
RETURN
_A / _B
Measure = IF (HASONEVALUE('Table'[names]),
VAR cur_name = VALUES( 'Table'[names])
RETURN DIVIDE(
CALCULATE( COUNTA( 'Table'[names]), ALL( 'Table' ), 'Table'[names] = cur_name )
,CALCULATE( COUNTA( 'Table'[names]), ALL( 'Table' ))
)
)
try this
Measure =
VAR _A =
CALCULATE(
COUNTA( 'Table'[names] ),
FILTER( ALLexcept( 'Table' , 'Table'[names] ) )
)
VAR _B =
CALCULATE( COUNTA( 'Table'[names] ), ALL( 'Table' ) )
RETURN
_A / _B
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 21 | |
| 10 | |
| 8 | |
| 8 |