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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
ivancans
Frequent Visitor

Report level filter by count of values

Hi,

 

For the purpose of this issue, let's say that I have two tables:

 

Google Analytics (GA table) with columns:

Source/Medium ID

and Income table with columns:

ID Income(EUR)

 

Both tables have a relationship (based on ID). 

 

What I need is to filter out data in report view by count of source/medium, to be precise, there needs to be at least 30 records of any specific source/medium, because otherwise, we are going to have income outliers that disturb my final result - a bar chart of average income by source/medium. The problem is, I don't know how to do because there are so many source/medium variations that it can't be done by hand, like using COUNTAX or CALCULATE+FILTER when I would indicate specific source/medium combination or a handful of combinations for example. 

1 ACCEPTED SOLUTION
v-frfei-msft
Community Support
Community Support

Hi @ivancans,

 

Please check the following steps as below.

 

1. Create a calcualted table using the formula.

 

Table = CALCULATETABLE(GA,FILTER(GA,CALCULATE(COUNTROWS(GA),ALLEXCEPT(GA,GA[Source/Medium]))>=30))

2. Create relationship between the calculated table and the income table.

 

3. Create a measure as bleow.

 

income = IF(ISBLANK(MAX('Table'[Source/Medium])),BLANK(),CALCULATE(SUM(Income[Income(EUR)])))

Capture.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

2 REPLIES 2
v-frfei-msft
Community Support
Community Support

Hi @ivancans,

 

Please check the following steps as below.

 

1. Create a calcualted table using the formula.

 

Table = CALCULATETABLE(GA,FILTER(GA,CALCULATE(COUNTROWS(GA),ALLEXCEPT(GA,GA[Source/Medium]))>=30))

2. Create relationship between the calculated table and the income table.

 

3. Create a measure as bleow.

 

income = IF(ISBLANK(MAX('Table'[Source/Medium])),BLANK(),CALCULATE(SUM(Income[Income(EUR)])))

Capture.PNG

 

For more details, please check the pbix as attached.

 

Regards,

Frank

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

Thank you, @v-frfei-msft !

It worked. I had a question though. How can this be done in query mode/view? I read that in general it is better to do data transformations in power query mode rather than in data view or report view with DAX.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.