blownbyyou
New Member
- Joined
- Mar 29, 2017
- Messages
- 6
So I am new to powerpivot and the DAX functionality, for the most part I have been able to google my way out of trouble. But unfortunately on this one I am completely stuck and was hoping to get some help. I am trying to do a simple countif but for some reason my forumulas keep coming back wrong or with errors...
The file is a list of all items booked in my company by day, I am trying to simply count the amount of occurrences that one item # has been on the list. Below is a simple idea of what I am trying to do...
[TABLE="width: 238"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Product #[/TD]
[TD]Count[/TD]
[/TR]
[TR]
[TD]D1125a[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]D1125a[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]D1125a[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]D1125a[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]D1125a[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]D1137[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]D1137[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]D1138[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
I tried to do the formula =CALCULATE(COUNTROWS('Source Data'),FILTER('Source Data','Source Data'[Product Number]=EARLIER('Source Data'[Product Number]))) but that came back as an error so I figured it was an issue with my earlier statement so I tried this...
=CALCULATE(COUNTROWS('Source Data'),FILTER('Source Data','Source Data'[Product Number]="d1125a")) and it came backe with value of 1 regardless of how many times that item # was listed...
What am I doing wrong?
Thanks for the help..
The file is a list of all items booked in my company by day, I am trying to simply count the amount of occurrences that one item # has been on the list. Below is a simple idea of what I am trying to do...
[TABLE="width: 238"]
<colgroup><col><col></colgroup><tbody>[TR]
[TD]Product #[/TD]
[TD]Count[/TD]
[/TR]
[TR]
[TD]D1125a[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]D1125a[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]D1125a[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]D1125a[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]D1125a[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD]D1137[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]D1137[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD]D1138[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
I tried to do the formula =CALCULATE(COUNTROWS('Source Data'),FILTER('Source Data','Source Data'[Product Number]=EARLIER('Source Data'[Product Number]))) but that came back as an error so I figured it was an issue with my earlier statement so I tried this...
=CALCULATE(COUNTROWS('Source Data'),FILTER('Source Data','Source Data'[Product Number]="d1125a")) and it came backe with value of 1 regardless of how many times that item # was listed...
What am I doing wrong?
Thanks for the help..