Forum Discussion

joshua1990's avatar
joshua1990
Post Prodigy
4 years ago

Calculated table with count

Hi experts!

I would like to create a calculated table with dax that shows me some dimensional data including the number of weeks where a specific goal has been reached.

The data model has a

  • simple calendar table (Date, Week,Month)
  • team table (County, Team, Product)
  • and a sales table (Product, SalesVolume, SalesRevenue, Date)

Those tables are linked by Date and Product.

Now I would like to create a table that shows for each country and team those kind of goals:

  • Sales 
    • Good: > 100
    • Neutral > 50
    • Bad < 50
  • Revenue
    • Good > 500
    • Neutral > 250
    • bad >250

I would like to see the number of weeks where this kind of goal has been reached.

The tables should look like this:

CountryTeamKPIGoalFrequence
FranceASalesGood10
FranceASalesBad5
FranceASalesNeutral3
FranceBRevenueGood12
FranceBRevenueBad6

 

 

How would you do that with DAX?

1 Reply

  • v-xiaotang's avatar
    v-xiaotang
    Community Support

    Hi joshua1990 

    Thanks for reaching out to us.

    Could you please provide some sample data of table sales according to the expected outcome you provide? Thanks.

     

    Best Regards,

    Community Support Team _Tang

    If this post helps, please consider Accept it as the solution to help the other members find it more quickly.