Forum Discussion
Count and sum unique Values
this is the Distinct Formula for Item
CountDataset = CALCULATE (
DISTINCTCOUNT ('Data Source'[ItemAr]))
which working Fine
Now there is one more Column where we mention 1 = Yes and 0 = No
now in Excel column Item have muti entries and Column Sale have 1 and 0
so i need in Power BI sum All Unique Sale Item with this CountDataset = CALCULATE (
DISTINCTCOUNT ('Data Source'[ItemAr]))
skorpion ill be honest you still not explaining very well, whats helpful is to show me some of your data and then what result you expect? trying to help wtih all the information helps
if i understand what you saying you only want unique products? unique products is 1 or 0? data will really help here
CALCULATE (
DISTINCTCOUNT ('Data Source'[ItemAr]), columnsale = 0)
that will give you the total count of all products that that have 0 columnsale
- skorpion8 years agoHelper I
Its very hard to explain
For exampple
Juice 1
Water 1
Juice 0
Water 1
Juice 1
Water 1
Output
juice 2
Water 3
- skorpion8 years agoHelper I
Item have cat and Sub cat sa well
Countorcale = CALCULATE (
DISTINCTCOUNT ('Data Source'[ItemAr]), DISTINCTCOUNT('Data Source'[CatAr]),DISTINCTCOUNT('Data Source'[SubAr]),'Data Source'[Orcale] = 1)- vanessafvg8 years agoCommunity Champion
skorpion please provide the sub categorry below too with the expected result
Juice 1
Water 1
Juice 0
Water 1
Juice 1
Water 1
Output
juice 2
Water 3
- skorpion8 years agoHelper I
solved thanks your help