cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
NumeroENAP
Helper III
Helper III

Get the number of repeated text values that are higher than 3 by ID

Hi, 

 

Table exemple : 

GROUP_NOIDVALUE
1001Banana
1011Banana
1021Banana
1031Apple
1041Apple

 

So, I want to get : 

ID                             1

   / Name                  Banana

         / Value             3

 

So, in the end, if my table containt 3 values "banana" with ID #1, I want it to appear in my report. But, with the same ID, if the value «apple» appear only twice, I don't want it to appear in my report. 

 

Thanks

 

1 ACCEPTED SOLUTION

Solution :
COUNT_VALUES_BY_ID:=CALCULATE(COUNTX('Table','Table'[Value]),FILTER('Table',COUNTX('Table','table'[Value])>2))

 

After that, I needed to play into the options of my dynamic table (uncheck totals and allow multiple filters by field). 

View solution in original post

8 REPLIES 8
az38
Community Champion
Community Champion

Hi @NumeroENAP 

try create a calculated table

Table 2 = FILTER(SUMMARIZE('Table','Table'[ID],'Table'[VALUE],"Count",COUNT('Table'[VALUE])),[Count]>2)

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

Hmmm, it doesn't work. It tells me that my query is refering to multiple columns (ID and Value) and that those can't be converted to scalar values.

az38
Community Champion
Community Champion

@NumeroENAP 

are you creating new table? not column or measure?


do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

The best I did so far was to create a calculated column to count all different values :

= COUNTX(FILTER(GROUPS, EARLIER(GROUPS[VALUES])=GROUPES_FRA[VALUES]),GROUPS[VALUES])

 

But, in my report, it always give it for all IDs. So, I need to add something to show it per ID, and that can also show it by value name for those which are 3 or higher. 

Well, for the needs of the user, I have to do this in Excel, so... I'm not used with calculated table in Excel (I don't even know if it's possible).

az38
Community Champion
Community Champion

@NumeroENAP 

ok, create a measure and filter by its value

Measure = calculate(countrows('Table'),allexcept('Table','Table'[ID],'Table'[VALUE]))

do not hesitate to give a kudo to useful posts and mark solutions as solution
LinkedIn

This is the result : 

ID  1

     Value 1      108

     Value 2          2

     Value 3      101

ID  2

     Value 1      108

     Value 2          2

     Value 3      101

Solution :
COUNT_VALUES_BY_ID:=CALCULATE(COUNTX('Table','Table'[Value]),FILTER('Table',COUNTX('Table','table'[Value])>2))

 

After that, I needed to play into the options of my dynamic table (uncheck totals and allow multiple filters by field). 

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors