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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Kalachuchi
Helper III
Helper III

Toggle Axis by a slicer

I have a table of sales below

 

Details

Client NameStatusStaffSupervisor
Test1CompletedArthur MorganDutch van der Linde
Test2PendingMicah Bell Karen Jones
Test3PendingArthur MorganKaren Jones

 

I wanna see how many Staff and supervisor are still on pending.

I have created another table which holds the word staff and supervisor and created a switch statement

 

RankTable

 

Switch(TRUE()
    ,Values('RankTable'[Rank])="Supervisor",[Number of Supervisor]
    ,Values('RankTable'[Rank])="Staff",[Number of Staff]
  
    ,blank())

 

 

Measure: Number of Supervisor

 

Number of Supervisor= DISTINCTCOUNTNOBLANK('Details'[Supervisor])

 

Measure: Number of Staff

 

Number of Staff= DISTINCTCOUNTNOBLANK('Details'[Staff])

 

 

 

Output will have a bar chart which x axis depends on the switch between view of staff or supervisor and will show how count of staff who still has pending status.

1 ACCEPTED SOLUTION
v-janeyg-msft
Community Support
Community Support

Hi, @Kalachuchi 

 

According to your description,I think you can modify your measure and use it in bar chart 'values'.

Like this:

Measure 2 = IF(SELECTEDVALUE(RankTable[Rank])="Supervisor",[Number of Supervisor],[Number of Staff])

9.png

8.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

View solution in original post

4 REPLIES 4
v-janeyg-msft
Community Support
Community Support

Hi, @Kalachuchi 

 

According to your description,I think you can modify your measure and use it in bar chart 'values'.

Like this:

Measure 2 = IF(SELECTEDVALUE(RankTable[Rank])="Supervisor",[Number of Supervisor],[Number of Staff])

9.png

8.png

If it doesn’t solve your problem, please feel free to ask me.

 

Best Regards

Janey Guo

 

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

@amitchandak ,bookmarks and button is what I was thinking but I have 3 more slicer so when there is already an active option on the other 3 slicer and user clicked the button slicer will reset everything.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.