Forum Discussion

YOSIEMPREYO12's avatar
YOSIEMPREYO12
Frequent Visitor
1 year ago
Solved

CANTIDAD DE LOCALES

Buenas tardes estimados   Tengo una tabla con 30 locales, articulo y total de venta   Yo necesito una fórmula que cuando selecciono un artículo me diga cuantos locales lo vendieron Puedo hacerlo...
  • v-sdhruv's avatar
    v-sdhruv
    1 year ago

    Hi YOSIEMPREYO12 ,

    You can make use of SUMX function here which will count stores that sold the article, and then sums it properly across months.

    Assuming you have a date table and your model is correctly related.
    StoresSoldPerMonth =
    SUMX(
    VALUES('Date'[Month]),
    CALCULATE(
    DISTINCTCOUNT(Sales[Store]),
    Sales[TotalSale] > 0
    )
    )
    Hope this helps!
    If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
    Thank you.