Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

problem with formula and column chart

Hello Community, The formula below runs with no errors, but on the visual you can see it returns the same result for every month  (blue column).  Not sure what is causing it?

 

Win Rate4 =
DIVIDE (
CALCULATE (
COUNT ( 'AllOpps-Products'[Description] ),
FILTER ( ALLSELECTED ( 'AllOpps-Products' ), [Status] = "Won" )
),
CALCULATE ( COUNT ( 'AllOpps-Products'[Description] ), ALL ( 'AllOpps-Products' ) )
)
 

2 Replies

  • Anonymous , I doubt join with date table or the table having a month .

    Usually, the numerator does have all selected 

     

    Win Rate4 =
    DIVIDE (
    CALCULATE (
    COUNT ( 'AllOpps-Products'[Description] ),
    FILTER ( ( 'AllOpps-Products' ), [Status] = "Won" )
    ),
    CALCULATE ( COUNT ( 'AllOpps-Products'[Description] ), ALLSELECTED ( 'AllOpps-Products' ) )
    )

    or

     

    Win Rate4 =
    DIVIDE (
    CALCULATE (
    COUNT ( 'AllOpps-Products'[Description] ),
    FILTER ( ALLSELECTED ( 'AllOpps-Products' ), [Status] = "Won" )
    ),
    CALCULATE ( COUNT ( 'AllOpps-Products'[Description] ), ALLSELECTED ( 'AllOpps-Products' ) )
    )

  • v-xuding-msft's avatar
    v-xuding-msft
    Community Support

    Hi Anonymous ,

     

    I'm not clear about your issue. If the formulas that amitchandak suggested can't work, please share some details like the relationship between month and the table "AllOpps-Products" and some sample data, your expected results with us.