Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Stelles3000
Regular Visitor

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. 

1 ACCEPTED SOLUTION

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

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

It is for creating a calculated measure.

 

Jihwan_Kim_0-1679335851723.png

 

 

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 ) )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


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

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

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Go to My LinkedIn Page


Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.