Forum Discussion

Stelles3000's avatar
Stelles3000
Regular Visitor
3 years ago
Solved

Procentage measure based on a specific row

I need a procentage measure which a specific row is the bases.

 

NamefieldAmount% Measure
Over150000591%
Target25366100%
Actual 11500059%
Actual 21655565%
Actual 32255589%

 

Target should allways be 100%. Numbers can change! The column % Measure is the result. 

  • Jihwan_Kim's avatar
    Jihwan_Kim
    3 years ago

    Hi,

    Thank you for your message.

    Please try something like below.

     

    Target measure: =
    VAR _target =
        CALCULATE (
            SUM ( Data[Amount] ),
            FILTER ( ALL ( Data[Namefield], Data[Amount] ), Data[Namefield] = "Target" )
        )
    RETURN
        _target

3 Replies

  • Hi,

    Please check the below picture and the attached pbix file.

    It is for creating a calculated measure.

     

     

     

    Percent measure: =
    VAR _target =
        CALCULATE (
            SUM ( Data[Amount] ),
            FILTER ( ALL ( Data[Namefield], Data[Amount] ), Data[Namefield] = "Target" )
        )
    RETURN
        IF ( HASONEVALUE ( Data[Namefield] ), DIVIDE ( SUM ( Data[Amount] ), _target ) )
    
    • Stelles3000's avatar
      Stelles3000
      Regular Visitor

      Thx for response. How do I create another coulmn that shows the target Amount in each row like this:

       

      NamefieldAmount% MeasureTarget
      Over150000591%25366
      Target25366100%25366
      Actual 11500059%25366
      Actual 21655565%25366
      Actual 32255589%25366
      • Jihwan_Kim's avatar
        Jihwan_Kim
        Icon for Super User rankSuper User

        Hi,

        Thank you for your message.

        Please try something like below.

         

        Target measure: =
        VAR _target =
            CALCULATE (
                SUM ( Data[Amount] ),
                FILTER ( ALL ( Data[Namefield], Data[Amount] ), Data[Namefield] = "Target" )
            )
        RETURN
            _target