Forum Discussion

cyborgandy's avatar
cyborgandy
Helper II
3 years ago
Solved

Unique Count and grouping

Hello All,

 

I have a below table.

Compnay NameSpendFiscal YearDepartment
Water50002022Sea
Rock100002022Forest
Salt30002021Sea
Rock10002022Forest
Water60002021Sea
Salt200002022Sea
Water500002021Sea
Water500002022Sea

 

What I am looking for output table is below:

DepartmentUnique Company CountCompany Count with more than >3 EntriesCompany Count with more than =2 Entries
Sea212
Forest101

 

Grouping Of company as per top spend as per DeptTotal Spend
1--2 
2--4 

 

Will this be possible to do it on power bi. Any help will be appericated.


  • cyborgandy , Measures

    Unique Company Count = DistinctCount(Table[Compnay Name])

     

    Count with more than >3 Entries = countx(filter(values(Table[Compnay Name]), calculate(count(Table[Compnay Name]) ) >3) , Table[Compnay Name])

     

    Count with more than >=2 Entries = countx(filter(values(Table[Compnay Name]), calculate(count(Table[Compnay Name]) ) >=2) , Table[Compnay Name])

1 Reply

  • cyborgandy , Measures

    Unique Company Count = DistinctCount(Table[Compnay Name])

     

    Count with more than >3 Entries = countx(filter(values(Table[Compnay Name]), calculate(count(Table[Compnay Name]) ) >3) , Table[Compnay Name])

     

    Count with more than >=2 Entries = countx(filter(values(Table[Compnay Name]), calculate(count(Table[Compnay Name]) ) >=2) , Table[Compnay Name])