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
SelflearningBi
Helper III
Helper III

How to refer to a column in measure.

SelflearningBi_0-1653562451345.png

OTIF Quantity % =
divide(CALCULATE(SUM('FW22_5 25'[Confirmed Quantity(Total)]),'FW22_5 25'[OTIF]="Yes"),SUM('FW22_5 25'[Confirmed Quantity(Total)]))
 

I have this function.  Since ther are empyt value in OTIF column. I would like my confirmed quantity exclused those sum of OTIF missing value. 

SelflearningBi_1-1653562580729.pngSelflearningBi_2-1653562601289.png

 

How should l

1 REPLY 1
v-kkf-msft
Community Support
Community Support

Hi @SelflearningBi ,

 

I am not sure if I understood your question correctly. Your measure [OTIF Quantity %] formula is correct, if you want to convert the calculated column [OTIF] to a measure, please use the MAX or SELECTEDVALUE function.

 

 

OTIF =
IF (
    ISBLANK ( MAX ( 'FW22_5 25'[on Time] ) ),
    BLANK (),
    IF (
        AND (
            MAX ( 'FW22_5 25'[In Full] ) = "Yes",
            MAX ( 'FW22_5 25'[on Time] ) = "Yes"
        ),
        "Yes",
        "No"
    )
)

 

 

If you want to calculate the percentage of the total value of the values listed as "Yes" in the [OTIF] column, try the following formula.

 

OTIF Quantity % = 
DIVIDE (
    CALCULATE (
        SUM ( 'FW22_5 25'[Confirmed Quantity(Total)] ),
        'FW22_5 25'[OTIF] = "Yes"
    ),
    SUMX ( ALL ( 'FW22_5 25' ), 'FW22_5 25'[Confirmed Quantity(Total)] )
)

vkkfmsft_0-1653903117098.png

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.