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

If functions on cards

ISSUE: When I choose all as a Filter, Portfolio Name and OCM Owner shows value that is FIRST to both fields. The FIRSTS of each data isn't the right relationship. 

 

QUESTION: Is there a way that if the filter is ALL, the Portfolio Name and OCM Owner cards would both show DASH (-) or null. There's no issue if I select a specific Portfolio Name because both cards show the correct values. 

 

If function sample.JPG

 

1 ACCEPTED SOLUTION
V-pazhen-msft
Community Support
Community Support

@Anonymous 

 

Measure1 = IF(ISFILTERED(Sheet1[Portfolio Name]),[Portfolio Name],"-")
Measure2 = IF(ISFILTERED(Sheet1[Portfolio Name]),[OCM Owner],"-")
 
Best Regards
Paul Zheng

View solution in original post

4 REPLIES 4
d_gosbell
Super User
Super User

You might also be able to use a measure with the SELECTEDVALUE function which has an optional parameter for what to return when there are multiple values selected.

eg.

 

Portfolio Name (Card) = SELECTEDVALUE(  'tablename'[Portfolio Name] , "-")

V-pazhen-msft
Community Support
Community Support

@Anonymous 

 

Measure1 = IF(ISFILTERED(Sheet1[Portfolio Name]),[Portfolio Name],"-")
Measure2 = IF(ISFILTERED(Sheet1[Portfolio Name]),[OCM Owner],"-")
 
Best Regards
Paul Zheng
itsmebvk
Continued Contributor
Continued Contributor

@Anonymous  Create a measure with follwing expression and see if that helps you.

 

Value =
var Distinct_Count = DISTINCTCOUNT(BaseData[Color])
var Count_All = CALCULATE(DISTINCTCOUNT(BaseData[Color]),ALL(BaseData[Color]))
return IF(Distinct_Count=Count_All,"-----",SUM(BaseData[SalePrice]))
 
Click 👍 if your issue is resloved.
Greg_Deckler
Super User
Super User

Perhaps try something like:

 

IF(HASONEVALUE('Table'[Column]),< whatever your value is >, BLANK())


@ 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.