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.
Quiero mostrar un gráfico dinámico según cuántos años se eligieron en una rebanadora. Cuando se seleccionó 1 año, se mostraría el gráfico circular, de lo contrario, el gráfico circular no mostraría nada. Así que creo una medida como el valor del gráfico circular.
stay number= if(COUNTROWS(VALUES(table1[years])=1,DISTINCTCOUNT(table1[Stay Number]),BLANK()).
El problema es que el gráfico circular todavía muestra algunos datos cuando esta medida devuelve BLANK(). Estoy tan confundido porque cuando dejo que el número de estancia sea directamente igual a BLANK(), el gráfico circular funciona correctamente. Me pregunto si hay algún problema con este DAX, pero he comprobado que el DAX devuelve BLANK() cuando seleccioné 2 años.
También intento otra medida:
número de estancia = if(ISFILTERED(tabla1[años]),DISTINCTCOUNT(tabla1[Número de estancia]),BLANK()).
El gráfico circular con esta medida funciona correctamente todo el tiempo. Pero no satisface mi requisito: solo mostrar cuándo se seleccionó 1 año fiscal.
¿Cómo puedo resolverlo?
Proporcione datos de muestra que cubran su problema o pregunta por completo, en un formato utilizable (no como una captura de pantalla).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Muestre el resultado esperado en función de los datos de muestra que proporcionó.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
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.