Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Try your skills in the Power BI Dataviz World Championship! Round one ends June 26. Join now

Reply
RolandsP
Resolver IV
Resolver IV

Filtering aggregated data

Hi,

 

I have following table consisting of 3 columns (sorry, for ugly marking on table)

 

Capture.JPG

 

 

I need to do 2 level aggregation on data:

 

1) First, I aggregate on Customers by doing a Distinct Count of ContainerClusterID.

 

Capture1.JPG

 

2) Second, I aggregate on obtained ClusterIDCount value by doing a Distinct Count of Customers (I want to know how many customers used 10 different ContainerClusterID which is 2).

 

I made a calculated table using such formula:

 

ClusterSummary =
var ClusterSummaryTable = SUMMARIZE('Data for 2 level aggregation',
'Data for 2 level aggregation'[Customer],
"ClusterIDCount", DISTINCTCOUNT('Data for 2 level aggregation'[ContainerClusterId]))
RETURN
SUMMARIZE(ClusterSummaryTable,
[ClusterIDCount],
"CustomerCount", DISTINCTCOUNT('Data for 2 level aggregation'[Customer]))

 

And get the result exactly I would like to get (see table below), but there is one problem I am unable to solve. I would like to be able to filter this table by date. I am unable to pass dynamic date filter (e.g. based on slicer selection) to this calculated table. 

 

Capture2.JPG

 

I have read that it is not possible to pass dynamic filter to calculated tables.

Can anyone advise how could I solve this issue?

 

Thanks!

 

 

 

2 ACCEPTED SOLUTIONS

Hi,

 

See if my solution here helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

Hi Ashish,

 

Thanks for your input. 

Although this didn't deliver the exact solution, the approach was right. 

I just made small modifications and got the result I needed.

If you are interested, you can see the final solution here.

 

Thanks,

Rolands

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

 

I am not sure of how much i can help here but I'd like to try.  What is the maximum number of Cluster iD we can have per Customer?  Also, share some data in an Excel file format.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,

 

Currently, there are 430 distinct values of Cluster ID in data set. There is no limitation on maximum number of ClusterIDs per Customer. At the moment, the maximum amount is 10.

There is some sample data: https://1drv.ms/u/s!AlWn1KJ98ETXgaBnthfrREbkdh5LJQ.

 

Thanks! 

Hi,

 

See if my solution here helps.

 

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish,

 

Thanks for your input. 

Although this didn't deliver the exact solution, the approach was right. 

I just made small modifications and got the result I needed.

If you are interested, you can see the final solution here.

 

Thanks,

Rolands

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
Fabric Data Days is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.