Forum Discussion

Davegent's avatar
Davegent
New Member
11 months ago
Solved

Help Please

Asset IDCustomerSiteLast Occurrence ( In Machine Time )SMU (In Hrs)Target PayloadTarget Plus 10%Target Plus 20%Payload Weight

 

=COUNTIFS(Payload_Weight,">=0",Payload_Weight,"<=222.9")/COUNTA(Payload_Weight)

 

Hi have this formula in a cell but would like to be able to have it dynamic and chnage when i use Asset ID column when i apply a filter to it 

 

So the ASSET ID has a range of DT216 to DT228, when i filter for a specific asset id i would like to have the for mula return a percentage for the formula attached 

 

  • Irwan's avatar
    Irwan
    11 months ago

    hello Davegent 

     

    i assumed the row 2 result come from the same formula as above.

     

    i am not sure how your visual will be but please check if this accomodate your need.

    create three measure for Green, Orange, and Red color calculation in row 2 with following DAX.

    Green =
    DIVIDE(
        COUNTX(
            FILTER(
                'Table',
                'Table'[Payload Weight]<'Table'[Target Payload]
            ),
            'Table'[Asset ID]
        ),
        COUNTA('Table'[Asset ID])
    )
    Orange =
    DIVIDE(
        COUNTX(
            FILTER(
                'Table',
                'Table'[Payload Weight]<'Table'[Target Plus 10%]
            ),
            'Table'[Asset ID]
        ),
        COUNTA('Table'[Asset ID])
    )
    Red =
    DIVIDE(
        COUNTX(
            FILTER(
                'Table',
                'Table'[Payload Weight]<'Table'[Target Plus 20%]
            ),
            'Table'[Asset ID]
        ),
        COUNTA('Table'[Asset ID])
    )

     

     
    Hope this will help.
    Thank you.

6 Replies

  • hello Davegent 

     

    as far as my knowledge, countif can be expressed as countx in pbi and counta is same as excel.

    so maybe something like this.

    divide(

    countx('payload',payload_weight>=0&&payload_weight<=222,9),

    counta('payload'[column])

    )

     

    for dynamic value, you need to use measure and plot into visual. the visual will be change depend on the slicer value.

     

    otherwise, please share your sample data that represent your original data (remove any confidential information)

     

    Hope this will help.

    Thank you.

  • this is my data columns, so would like to filter column B and have percentages change in row 2 to reflect ASSET ID picked. 

    • Irwan's avatar
      Irwan
      Super User

      hello Davegent 

       

      i assumed the row 2 result come from the same formula as above.

       

      i am not sure how your visual will be but please check if this accomodate your need.

      create three measure for Green, Orange, and Red color calculation in row 2 with following DAX.

      Green =
      DIVIDE(
          COUNTX(
              FILTER(
                  'Table',
                  'Table'[Payload Weight]<'Table'[Target Payload]
              ),
              'Table'[Asset ID]
          ),
          COUNTA('Table'[Asset ID])
      )
      Orange =
      DIVIDE(
          COUNTX(
              FILTER(
                  'Table',
                  'Table'[Payload Weight]<'Table'[Target Plus 10%]
              ),
              'Table'[Asset ID]
          ),
          COUNTA('Table'[Asset ID])
      )
      Red =
      DIVIDE(
          COUNTX(
              FILTER(
                  'Table',
                  'Table'[Payload Weight]<'Table'[Target Plus 20%]
              ),
              'Table'[Asset ID]
          ),
          COUNTA('Table'[Asset ID])
      )

       

       
      Hope this will help.
      Thank you.
  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi Davegent ,

    Thank you Irwan  for your updates.

    We’d like to follow up regarding the recent concern. Kindly confirm whether the issue has been resolved, or if further assistance is still required. We are available to support you and are committed to helping you reach a resolution.

    Best Regards,
    Chaithra E.

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi Davegent ,

    I hope the information provided by Irwan  is helpful. I wanted to check whether you were able to resolve the issue with the provided solutions. Please let us know if you need any further assistance.

    Thank you.

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi Davegent ,

    May I ask if you have resolved this issue? Please let us know if you have any further issues, we are happy to help.

    Thank you.