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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Create a Card that hides or shows values depending on the filter selection

Hi!

I would like to create a card that is dependent of a filter selection.

So, i am using conditional formating to solve this issue. I have a date visual that looks like this:

Date Visual v2 = IF(ISFILTERED('MTD/QTD/YTD Selection_v2'),"MTD "&MAX('MTD/QTD/YTD Selection_v2'[YEAR/MONTH]),(" "))

This works fine. Although when i am not selecting MTD or PMTD i want the text to be white or blank and therfore i created this measure to conditional format with:

Make Transparent Measure = IF(SELECTEDVALUE('MTD/QTD/YTD Selection_v2'[Selection]) = "MTD" && "PMTD", "#000000",
IF(SELECTEDVALUE('MTD/QTD/YTD Selection_v2'[Selection]) = "MTD" || "PMTD", "#000000","#FFFFFF" ))

with the above mentioned measure i get an error:
"Cannot convert value 'PMTD' of time text to type True/False" and i guess that is because i have 2 values instead of one.

Is there a way to bypass this or use another dax-format to get the expected result?

Kind Regards
D.Z

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

Please have a try.

Date Visual v2 =
IF (
    SELECTEDVALUE ( 'MTD/QTD/YTD Selection_v2' ) <> BLANK (),
    "MTD " & MAX ( 'MTD/QTD/YTD Selection_v2'[YEAR/MONTH] ),
    ( " " )
)

 

If it does not help, please provide more details with your desired output and pbix file without  priavcy information.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

Please have a try.

Date Visual v2 =
IF (
    SELECTEDVALUE ( 'MTD/QTD/YTD Selection_v2' ) <> BLANK (),
    "MTD " & MAX ( 'MTD/QTD/YTD Selection_v2'[YEAR/MONTH] ),
    ( " " )
)

 

If it does not help, please provide more details with your desired output and pbix file without  priavcy information.

 

Best Regards

Community Support Team _ Polly

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

A similar solution to this is what i am after:

IF (
SELECTEDVALUE ( 'MTD/QTD/YTD Selection_v2'[Selection] ) = "MTD" && "PMTD" ,
"MTD " & MAX ( 'MTD/QTD/YTD Selection_v2'[YEAR/MONTH] ),
(" ")
)
Becuse that calculation gives me an error.
"Cannot convert 'PMTD' of type Text to type True/False
Anonymous
Not applicable

Hi @Anonymous amd thank you for your answer!

Unfortunately that is not quite what i am after. That works fine if i have one value!

But what if i filter MTD & PMTD then the card will become blank

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors