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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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