Reply
avatar user
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...
avatar user

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!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)