Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Dinamic title - if condition

Hello, I am new to this forum but I couldn't find any similar thread with the problem I am facing. So I have a card which I want to have a dinamic title. I already went to conditional formating...
  • ghoshabhijeet's avatar
    4 years ago

    Anonymous  Yes, you can achive this with the SWITCH function. Here is my solution. Hope this works for your requirement.

    1. Create a measure in the similar fashion with your required text.

     

    Text Based on Category = SWITCH(
    TRUE(),
    MIN('DataTable'[Category]) = "Category 1", "Text One",
    MIN('DataTable'[Category]) = "Category 2", "Text Two",
    MIN('DataTable'[Category]) = "Category 3", "Text Three",
    MIN('DataTable'[Category]) = "Category 4", "Text Four"
    )

    2. Once the measure is created put it in the card visual and here is the result.

     

     

    ** If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution, so that it comes in top of the search and help others. Thank you !

    Good Luck 👍