Forum Discussion

Riggan2023's avatar
Riggan2023
Frequent Visitor
3 years ago

Group count with filtration

Hi. I need to create a count with grouping and filtration. I can easily create counting with groupping but cant figure out how to make it with previously filtered data.

 

So

I have a table called Main and it has three main columns: ArchDate, Type, Status. I have created a slicer for Type and for Status. Also I have created aditional virtual table Prices whith vounting grupped by ArchDate. I have put this to simple Bar visual. Main and Prices does not have any connections. So how to make filters work? I use this dax code to create counting with grouping. But i dont know where to put filter

 

prices = CALCULATETABLE(GROUPBY(Main,Main[ArchDate],"VAL",COUNTX(CURRENTGROUP(),COUNT(Main[ArchDate]))))

 

 

Please see my sample pbix https://file.io/BkvQZCNtIvGY 

2 Replies

  • You don't need your calculated tables at all.  You can use implicit "count" measures and the implicit date hierarchy.

     

    See attached.

  • Hi,

    Why are you creating a Price table?  Doesn't this measure work?

    Measure = count(Main[ArchDate])