Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register 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
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
16 | |
13 | |
12 | |
11 | |
11 |
User | Count |
---|---|
19 | |
14 | |
14 | |
11 | |
9 |