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
darry3ni
Frequent Visitor

Different measure result for Table Visual Title

I'm trying to use a measure as a dynamic title for a table visual but it returns the wrong value.

 

Included is a test example of this:

  1. Source for countrows is the same (partly whited out)
  2. Source contains 27 rows.
  3. Image has a slicer visual over a table visual.

test.PNG

1 ACCEPTED SOLUTION
darry3ni
Frequent Visitor

Was able to make it work by adding DISTINCT after COUNTROWS on both sides.

View solution in original post

4 REPLIES 4
darry3ni
Frequent Visitor

Was able to make it work by adding DISTINCT after COUNTROWS on both sides.

ebeery
Solution Sage
Solution Sage

@darry3ni first red flag here is the use of ALLSELECTED - what exactly are you trying to achieve with that function?

ALLSELECTED() is somewhat notorious for being one of the most complicated DAX functions, so unless you have a very specific reason that requires it I would see if there are alternatives you could be using to achieve the same result more simply?

I have another slicer to filter the table, so I'm using ALLSELECTED to return a row count of the filtered table. Is there an easier way to get that row count?

Did you try just using a regular COUNTROWS( Main Table) without the ALL()?

Also, are you actually trying to return a row count or are you just trying to determine if the table is filtered?  If the latter, I'd recommend just using the ISFILTERED() function.

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.