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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

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())



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

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!

December 2024

A Year in Review - December 2024

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