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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Where to include the ALL function in my measure

Hi,


I have the following measure:


Measure =

VAR counting= ADDCOLUMNS('Tabel2',"Counthowmanytimes",COUNTROWS(FILTER(Combined,FIND('Tabel2'[Issue Source],TABLE1[Issue Source],,0)>0)))

RETURN

SUMX(counting,[Counthowmanytimes])

This measure (if I am correct) counts how many times the [Issue Source] column from Table 2 matches the [Issue Source] from Table 1.


Table 1 and 2 are disconnected tables (and should stay that way).

The [Issue source] column from table 2 has parts of the text of the [Issue source] column from table 1.

 

Now I want to include an ALL function from a column because I want to exclude a slicer from Table 1 on the visual page.

 

Can you please help me, where do I include this ALL function?  
I have tried to include it directly after FILTER(ALL) => but then I cannot use the tablename directly afterwards anymore.

Thank you for your advice on this measure.



1 ACCEPTED SOLUTION
Anonymous
Not applicable

For future references: I solved it differently eventually.
First I connected the tables in the datamodel on [Issue Source]. Then I used the following measure: 

 

CALCULATE(COUNT(Table1[ID]), ALL(Table1[Priority]), FIND(Table2[Issue Source],Table1[Issue Source],,0))


NB the COUNT(Table1[ID] was not mentioned in the post above, but could as well have been another column. The above measure solved the inclusion of the ALL function nicely.

View solution in original post

3 REPLIES 3
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

Thanks for your sharing! Would you mind accept the helpful replies as solutions? Then we are able to close the thread. More people who have the same requirement will find the solution quickly and benefit here. Thank you.


Best Regards,
Community Support Team_ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

For future references: I solved it differently eventually.
First I connected the tables in the datamodel on [Issue Source]. Then I used the following measure: 

 

CALCULATE(COUNT(Table1[ID]), ALL(Table1[Priority]), FIND(Table2[Issue Source],Table1[Issue Source],,0))


NB the COUNT(Table1[ID] was not mentioned in the post above, but could as well have been another column. The above measure solved the inclusion of the ALL function nicely.

Greg_Deckler
Super User
Super User

@Anonymous Maybe:

VAR counting= ADDCOLUMNS('Tabel2',"Counthowmanytimes",COUNTROWS(FILTER(Combined,FIND('Tabel2'[Issue Source],ALL(TABLE1[Issue Source]),,0)>0)))

It's hard to know for sure without sample data to test with


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.