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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
SteveIOW
Helper II
Helper II

error when more than one value

Hello,

 

I have a card I am using to change a title for a summary page depending on the 'Modality' chosen. Shown below.

My problem is that users may want to filter to the 'Big 7' before going to individual 'Modality' but when they do - it errors because, presumably v1V is filtering to more than one Modality.

 

Any ideas how I can get over this?

Kind regards

Steve

 

 

SelectedModComm =
VAR v1V = "Summary for " & VALUES(Modalities[Modality]) & " only"
VAR v0V = "Summary Page"
RETURN
IF(
HASONEVALUE(Modalities[Big 7]), "Big 7",
IF(
HASONEVALUE(Modalities[Modality]), v1V, v0V
)
)
2 REPLIES 2
selimovd
Super User
Super User

Hey @SteveIOW ,

 

VALUES returns a list of values. For that reason there is the error.

You could use MIN or MAX to get a single value or you can combine the VALUES with the CONCATENATEX function.

 

If you need any help please let me know.
If I answered your question I would be happy if you could mark my post as a solution ✔️ and give it a thumbs up 👍

Best regards
Denis

Blog: WhatTheFact.bi
Follow me: twitter.com/DenSelimovic

Thanks @selimovd 

I had sort of worked that out - although thanks for confirming.

I don't quite understad how to do either of you suggestions though. Min/Max requires a table and although I thought Values created a table it seems I can't use it?

 

thanks for taking your time over this.

Steve

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.