Forum Discussion

DMB90's avatar
DMB90
Helper II
1 year ago
Solved

Help with Division Formula with Word Conditions

Hello, I want to create a formula to do the following and essentially give me a percentage.

 

If 0.WTComplete/Incomplete equals Complete, then count the number of complete (11), and divide that number of complete by the count of 1.WTApplicable that equals Applicable (62).

  • I'll do my best with the limited information provided.  I don't know what your table is called, and I assumed it's all in one table, and that table is called 'Table'.  You'll need to modify this measure to fit your needs.

     

    division_formula = 
    var numerator = CALCULATE(COUNTROWS('Table'), 'Table'[0.WTComplete/Incomplete] = "Complete")
    var denominator = CALCULATE(COUNTROWS('Table'), 'Table'[1.WTApplicable] = "Applicable")

    Return
    DIVIDE(numerator, denominator, 0)

     

    ///Mediocre Power BI Advice, but it's free///

2 Replies

  • kpost's avatar
    kpost
    Solution Sage

    I'll do my best with the limited information provided.  I don't know what your table is called, and I assumed it's all in one table, and that table is called 'Table'.  You'll need to modify this measure to fit your needs.

     

    division_formula = 
    var numerator = CALCULATE(COUNTROWS('Table'), 'Table'[0.WTComplete/Incomplete] = "Complete")
    var denominator = CALCULATE(COUNTROWS('Table'), 'Table'[1.WTApplicable] = "Applicable")

    Return
    DIVIDE(numerator, denominator, 0)

     

    ///Mediocre Power BI Advice, but it's free///

  • Hi,

    Share some data to work with and show the expected result.  Share data in a format that can be pasted in an MS Excel file.