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.
Solved! Go to Solution.
Hi @tatac1412 ,
You should modified this code: countx('EHC', var31)
Both EHC and var31 are tables, thus you can't make this measure work.
Based on your description, I have created a simple sample:
Please try something like this:
ProporHemoSev<18 =
Var var31=filter('EHC','EHC'[V31EsquemaTratamientoActual] IN {"1","2","4"})
Var Numerador1 = if( NOT ISEMPTY (var31), COUNTROWS(var31))
var Numerador = if( NOT ISEMPTY (var31),count('EHC'[AñoCorte]) - Numerador1)
var denominador= count('EHC'[AñoCorte])
Var ProporHemosev = if( NOT ISEMPTY (var31),divide( Numerador,denominador*100))
return ProporHemosev
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @tatac1412 ,
You should modified this code: countx('EHC', var31)
Both EHC and var31 are tables, thus you can't make this measure work.
Based on your description, I have created a simple sample:
Please try something like this:
ProporHemoSev<18 =
Var var31=filter('EHC','EHC'[V31EsquemaTratamientoActual] IN {"1","2","4"})
Var Numerador1 = if( NOT ISEMPTY (var31), COUNTROWS(var31))
var Numerador = if( NOT ISEMPTY (var31),count('EHC'[AñoCorte]) - Numerador1)
var denominador= count('EHC'[AñoCorte])
Var ProporHemosev = if( NOT ISEMPTY (var31),divide( Numerador,denominador*100))
return ProporHemosev
Final output:
Best Regards,
Jianbo Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Try this version
ProporHemoSev<18 =
Var var31=filter('EHC','EHC'[V31EsquemaTratamientoActual] IN {"1","2","4"})
Var Numerador1 = if( NOT ISEMPTY (var31), countx('EHC', var31))
var denominador= count('EHC'[AñoCorte])
var Numerador = if( NOT ISEMPTY (var31),denominador - Numerador1)
return if( NOT ISEMPTY (var31),divide( Numerador,denominador*100,0))
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 |
---|---|
15 | |
10 | |
10 | |
10 | |
10 |
User | Count |
---|---|
19 | |
14 | |
13 | |
11 | |
8 |