Forum Discussion
hcvora
2 years agoNew Member
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.
| Store | Fruit | Date | Sales units |
| A | Apple | 1st May | 4 |
| A | Orange | 1st May | 2 |
| A | Banana | 1st May | 6 |
| A | Orange | 3rd May | 3 |
| A | Banana | 3rd May | 5 |
| B | Apple | 1st May | 12 |
| B | Orange | 4th May | 10 |
| B | Banana | 5th May | 5 |
| C | Apple | 2nd May | 6 |
| C | Banana | 2nd May | 4 |
| C | Apple | 5th May | 8 |
| C | Orange | 9th May | 3 |
| C | Banana | 9th May | 3 |
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
- xifeng_L
Super User
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~
- hcvoraNew Member
This worked! Thanks a lot.