Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago

Create conditional numbers based on category and selected value

Hello!
I need help with one thing.
I have data for several factories which belongs to different "clusters".
I want to make highlighting with conditional formatting easy.
If i select a factory on a slicer, I want to give it a 1.
If a factory is in the same cluster, I want to give it a 2.
Else, I want to give it a 3.
 
If I select FacE I want my table to look like this:
Factory
Measure
FacA
3
FacB
3
FacC
2
FacD
2
FacE
1
And if I select FacA it should look like this:
Factory
Measure
FacA
1
FacB
2
FacC
3
FacD
3
FacE
3
I have created a table with the names and clusters of the factories without relationships. And this is the measure i've created but it doesn't work:

 

Do you have any ideas? It might even be that I just have to change "VALUES" to something else. I get the error-message: "A table of multiple values was supplied where a singe value was expected"

4 Replies

  • selimovd's avatar
    selimovd
    Most Valuable Professional

    Hey Anonymous ,

     

    I'm not sure if I understood you right, but if you slice for "FacE" the other factories will not be visible anymore.

    Or did I miss something?

     

    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
     
    • Anonymous's avatar
      Anonymous
      Not applicable

      selimovd 
      Yes, that is the case but that is not what i am searching for. That is why I created a separate table so that when i select something, the other alternatives will not dissapear.


      When i select a factory in the highlighting table, i want all the factories from the entities/groups-table to be visible, I just want them to receive a number depending on the selection i made in the highlighting table.


      Do you have any ideas on how to accomplish this?
      And if something still is unclear, please don't hesitate to contact me.
      Thank you 🙂

      • selimovd's avatar
        selimovd
        Most Valuable Professional

        Anonymous  What is the order of the other factories? Where is that written? What happends if I select FacC? Is then FacA 3 or is FacE 3?

        Can you share your file? That would make it easier to help you when you explain the logic you want to implement.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

    Can you provide a complete data for your case ? The fields in your measure are all ambiguous so that I cannot know how to deal with it .

    Please attach your complete pbix file (without Private information) and the result you want .

     

    Best Regards

    Community Support Team _ Ailsa Tao

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