Forum Discussion

Takamani2022's avatar
Takamani2022
Helper I
4 years ago

selected value, switch

tengo el siguiente problema , cuando se selecciona la opicion de la segmentacion deberia mostrarme el porcentaje en el medidor. Pero me muestra el 100% cuando deberia mostrarme el porcentaje correcto. 

  

he usado la funcion selected value, 

Captura_indicador = SELECTEDVALUE(Resultados[Sector homologado (data)], "Please Choose me")
y el switch que se muestra en la imagen.
 
algun consejo o algo para mejorar?

 

 

18 Replies

  • MFelix  los porcentajes lo calcule de esta forma

    %Aluminio =

    var cantidad= [Aluminio]

    var total= [Encuestados]
    RETURN

    divide(cantidad, total)

    • MFelix's avatar
      MFelix
      Super User

      Hi Takamani2022 ,

       

      What I can see is the this measure is also based on another two measures can you share the other two measures formula? Believe that your issues may be related with the Encuestados measure.

  • MFelix 

    La formula para  encuestados fueron asi :Encuestados= COUNTROWS(Resultado),

    captura indicador = selected value Resultados[Sector homologado (datos)] "elija la opcion" )

     

  • No entiendo por que hace tan complejo 🤔

    Puede hacer algo como esto?

    Disculeme por mi pobre español 😅



    Sum of Value = SUM('Table'[Value])

    Percentage of Total =
    DIVIDE(
    [Sum of Value],
    CALCULATE([Sum of Value],REMOVEFILTERS('Table'[Sector])
    ))

     

  • NickolajJessen  el problema es , cuando se selecione cualquier nombre de la lista del segmentador se deba mostrar el porcentaje  y el nombre de la lista que fue seleccionada.

    • MFelix's avatar
      MFelix
      Super User

      Takamani2022 ,

       

      Your measure is

      %Aluminio =
      
      var cantidad= [Aluminio]
      
      var total= [Encuestados]
      RETURN
      
      divide(cantidad, total)

       

      So the part of [Aluminio] how is it calculated?

    • MFelix's avatar
      MFelix
      Super User

      Hi  Takamani2022 ,

       

      Try the following code for the Encuestados

       

      Encuestados= COUNTROWS(ALL(Resultado))

       

    • MFelix's avatar
      MFelix
      Super User

      Takamani2022 

       

      Can you please share a mockup data or sample of your PBIX file. You can use a onedrive, google drive, we transfer or similar link to upload your files.

      If the information is sensitive please share it trough private message.