Forum Discussion

RoxanaZaharia's avatar
2 years ago
Solved

need help with this table visualization

Hello! I have this dataset (as seen in the photo), and I want to create a table visualization listing only the types of cheeses that the restaurant uses. I tried splitting the column using a comma de...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi RoxanaZaharia ,

     

    This problem may occur because there are spaces before the words.

     

    Just remove the spaces in Power Query.

     

    Create a measure to determine whether it is cheese:

    isCheese =
    VAR a = CONTAINSSTRING(MAX('pizza_types'[ingredients]),"Cheese")
    RETURN IF(a,1,0)

     

    Create a table:

    Table = CALCULATETABLE(
         SUMMARIZE('pizza_types',
         'pizza_types'[ingredients]),
         FILTER('pizza_types','pizza_types'[isCheese] = 1)
         )

     

    Create a count measure:

    Count = DISTINCTCOUNT('Table'[Types of Chees])

     

    The final page effect is as follows:

     

    pbix file is attached.

     

    If you have any further questions please feel free to contact me.

     

    Best Regards,
    Yang
    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!