Forum Discussion

SteveIOW's avatar
SteveIOW
Helper II
4 years ago

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

  • selimovd's avatar
    selimovd
    Most Valuable Professional

    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

    • SteveIOW's avatar
      SteveIOW
      Helper II

      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