Forum Discussion

ansa_naz's avatar
ansa_naz
Icon for Continued Contributor rankContinued Contributor
6 years ago
Solved

Count customers making a loss

Hi all Really hoping someone can help with this measure I am trying to create! So my data is as follows: Customer ID Name A Name A B Name B C Name C Forecasts     Cu...
  • JasonTX's avatar
    6 years ago

    Hi!

     

    I hope this helps answer your question:

     

    Measure = 
    COUNTX(
    FILTER(
    SUMMARIZE(
    'Customer',
    'Customer'[ID],
    'Customer'[Name],
    "Actual", SUM('Actuals'[Amount]),
    "Forecast" , SUM('Forecasts'[Amount])
    ),
    [Actual] > [Forecast]),
    'Customer'[ID]
    )

     

    Regards

  • PaulDBrown's avatar
    6 years ago

    ansa_naz 

     

    Try this:

    First create Sum measures for both Sales and Forecast:
    Sum of sales = SUM(Sales[sales]) "Actuals" in your example
    Sum of Forecast = SUM(Forecast[forecast])  "Forecasts" in your example

    and then:

     Obvisously use your customer table instead of my "Sales Product" table. (Assuming your Customer table is linked in one-to-many with both your sales table and forecast table)