Forum Discussion

mohuas's avatar
mohuas
New Member
8 years ago
Solved

Ratio calculation from same column

The below screenshot is an example of sorted data where we have city, month, the numerator (Sales), the denominator (Opportunity) and values. Now, we want to calculate the Sales % i.e., Sales / Opportunity – city wise + month wise, and create a dashboard for the same. I am unable to do so in Power BI, please help.

 

  • Hi mohuas

     

    Try this MEASURE

     

    Sales% =
    DIVIDE (
        CALCULATE ( SUM ( TableName[Value] ), TableName[Attribute] = "Sales" ),
        CALCULATE ( SUM ( TableName[Value] ), TableName[Attribute] = "Opportunity" )
    )

2 Replies

  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    Community Champion

    Hi mohuas

     

    Try this MEASURE

     

    Sales% =
    DIVIDE (
        CALCULATE ( SUM ( TableName[Value] ), TableName[Attribute] = "Sales" ),
        CALCULATE ( SUM ( TableName[Value] ), TableName[Attribute] = "Opportunity" )
    )