Forum Discussion

hcvora's avatar
hcvora
New Member
2 years ago
Solved

Need help with DAX calculation

Hi All,

 

Need help with DAX formula to calculate productive store days with below sample data

 

Meaning of productive store days: >=10 units billed (of any Fruit) to a store on a day.

 

For below data, productive days will be 4 (A on 1st May, B on 1st & 4th May, C on 2nd May)

 

Thanks in advance.

 

StoreFruitDateSales units
AApple1st May4
AOrange1st May2
ABanana1st May6
AOrange3rd May3
ABanana3rd May5
BApple1st May12
BOrange4th May10
BBanana5th May5
CApple2nd May6
CBanana2nd May4
CApple5th May8
COrange9th May3
CBanana9th May3
  • Hi hcvora 

     

    You can try below measure.

     

     

     

    productive store days = 
    COUNTROWS(
        FILTER(
            SUMMARIZE('Table','Table'[Store],'Table'[Date],"Units",SUM('Table'[Sales units])),
            [Units]>=10
        )
    )

     

     

     

    Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

     

    Thank you~

     

2 Replies

  • Hi hcvora 

     

    You can try below measure.

     

     

     

    productive store days = 
    COUNTROWS(
        FILTER(
            SUMMARIZE('Table','Table'[Store],'Table'[Date],"Units",SUM('Table'[Sales units])),
            [Units]>=10
        )
    )

     

     

     

    Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !

     

    Thank you~