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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
y5famfnatudu
Helper III
Helper III

Convert a SWITCH to Slicer

Hello,

Is it possible to convert a SWITCH result into slicer? Putting in mind that I am not allowed to do that using calculated tables or parameters

 

For example, using the following SWITCH example

 

SWITCH (
    TRUE,
    [A] > [B], "First case",
    [A] = [B], "Second case",
    [A] = 0, "Third case",
    "Fourth case"
)

 

 I would like to have a slicer that contains the values:

  • First case
  • Second case
  • Third case
  • Fourth case

Thank you so much for your kind assistance.

 

Best regards,

Simon

5 REPLIES 5
Ahmedx
Super User
Super User

See if this approach suits you

https://dropmefiles.com/KXHUY

2023-02-14_14-32-22.png

Hello @Ahmedx,

Thank you so much. Unfortunately, that won't work, and won't be accepted as per our company's standard.

Best regards,

Simon

Ahmedx
Super User
Super User

create a table

Table= DATATABLE("ID",INTEGER,"Value",STRING,{
    {1,"First case"},
    {2,"Second case"},
    {3,"Third case"},
    {4,"Fourth case"}

})

 

Hello @Ahmedx 

Thank you for your answer, but as I mentioned in my message I cannot create calculated tables or columns.

Unfortunately, that won't help.

 

Best regards,

Simon

Idrissshatila
Super User
Super User

Hello @y5famfnatudu ,

 

Slicers can only be used by columns, so unless you have the result in a  column then you can't visualise it in a slicer.

 

If I answered your question, please mark my post as solution so it would appeare to others, Appreciate your Kudos👍

 

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.