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
RENJITH_R_S
Resolver I
Resolver I

Help : Slicer & Graph

Hello friends

 

I have a requirement like 

 

Week No

Week 32

Week 31

Week 30

Week 29

Week 28 & so on

 

 

I m using this week no as a slicer

 

I m ploting a bar graph with this Week No as axis & another column with values

 

my requirement is if i m selecting week 32 on slicer graph needs to show week 32 , week 31 & week 30 in the axis with its values

 

similarly if i m selecting week 31 on slicer graph needs to show week 31 , week 30 & week 29 in the axis with its values and so on 

 

Please help on this

1 ACCEPTED SOLUTION

Hi @RENJITH_R_S ,

This is my PBIX file.

https://microsoftapc-my.sharepoint.com/:u:/g/personal/v-lazhang_microsoft_com/ESF9taOGrPFCvXG7qGqSxZ...

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

6 REPLIES 6
amitchandak
Super User
Super User

@RENJITH_R_S , For that you need an independent week table also.

 

refer this video - same approach you have to follow

https://www.youtube.com/watch?v=duMSovyosXE

thanks @amitchandak 

Hi @RENJITH_R_S ,

You need to create a separate table that contains the Week No column and apply it to the slicer.

v-kkf-msft_0-1614331780033.png

Then create the following measure as value of the bar chart.

Measure = 
var selectvalue = 
  RIGHT(
    SELECTEDVALUE('Slicer Table'[Week No]),
    2
  )
var tab =
  FILTER(
    'Table',
    RIGHT( 'Table'[Week No], 2 ) in {selectvalue,selectvalue-1,selectvalue-2}
  )
return 
  SUMX( tab, 'Table'[Value] )

v-kkf-msft_1-1614331832202.png

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

 

@v-kkf-msft Thanks for the response. This is my requirement, but i m not able to acheive it by your solution. Can you share your pbix file. I followed your steps but for me only selected week value is showing , other 2 values not showing

Hi @RENJITH_R_S ,

This is my PBIX file.

https://microsoftapc-my.sharepoint.com/:u:/g/personal/v-lazhang_microsoft_com/ESF9taOGrPFCvXG7qGqSxZ...

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.

Best Regards,
Winniz

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

@v-kkf-msft Thanks

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.