Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Finding difficulty in using the measure in Slicer - Help needed, Please

Hello PBI Community

 

Just a little background about the below table.

 

 

Name data coming from the "Talent" table. Rest all the four fields are Measures. Finding difficulty in using the measure in Slicer.

 

I managed to get halfway through with my measure and for Slicer i created a new table called "Booking" which is giving me the output, but not satisfying one. What I mean, I'm getting "Booked" status marked employee along with "-". Ideally, I don't want to see "-" marked employees on the table.

 

Booking Measures =
IF(
HASONEVALUE(Talent[Name]),
IF(HASONEVALUE(Booking[Booking_Status]),
SWITCH( VALUES(Booking[Booking_Status]),
"Booked",[Booked],
"Partial",[Partial],
"Not Booked", [Not Booked]),
"-"
))

 

My objective is to filter the underlying table (which also contains this measure) based on what users are indicating in the slicer. So the use case is if I choose the Slicer "Booked", show only employee name marked as "Booked", similarly, when we click Partial, only "Partial" marked employee name should be shown.

 

My requirement ouput in visual display format.

 

1. Name by Booking Status

 

 

 

2. Count by Booking Status

 

 

Hope I'm clear with my requirement.


If anyone can help would be highly appreciated.

 

Many Thanks

  • Hi Anonymous ,

     

    If the BookingStatus is a measure, We can use a measure in Visual Filter(set as greater than zero) after create a table as Slicer to meet your requirement:

     

    1. create a table as the slicer:

     

     

    2. use the measure in visual filter of table visual:

     

    Status Control =
    IF ( [Booking Status] IN FILTERS ( 'StatusSlicer'[Value] ), 1, -1 )

     

    If you want to count by the booking status, we can use the  'StatusSlicer'[Value]  and following measure in slicer to meet your requirement:

     

    Count by Booking Status =
    COUNTROWS (
        FILTER (
            SUMMARIZE ( 'Talent', 'Talent'[Name], "Status", [Booking Status] ),
            [Status] IN FILTERS ( 'StatusSlicer'[Value] )
        )
    )
    


    Best regards,

     

2 Replies

  • v-lid-msft's avatar
    v-lid-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    If the BookingStatus is a measure, We can use a measure in Visual Filter(set as greater than zero) after create a table as Slicer to meet your requirement:

     

    1. create a table as the slicer:

     

     

    2. use the measure in visual filter of table visual:

     

    Status Control =
    IF ( [Booking Status] IN FILTERS ( 'StatusSlicer'[Value] ), 1, -1 )

     

    If you want to count by the booking status, we can use the  'StatusSlicer'[Value]  and following measure in slicer to meet your requirement:

     

    Count by Booking Status =
    COUNTROWS (
        FILTER (
            SUMMARIZE ( 'Talent', 'Talent'[Name], "Status", [Booking Status] ),
            [Status] IN FILTERS ( 'StatusSlicer'[Value] )
        )
    )
    


    Best regards,

     

  • v-lid-msft's avatar
    v-lid-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous ,

     

    How about the result after you follow the suggestions mentioned in my original post?Could you please provide more details about it If it doesn't meet your requirement?


    Best regards,