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
rane19
Helper I
Helper I

How to restrict only multi year based on single-selected slicer in bar chart axis ? Power BI

Sample Data :

Date      Type Family Type Sub Value
2018/01/01 Faimly_A A 377
2018/01/01 Faimly_A A 30
2018/01/01 Faimly_A B 470
2018/01/01 Faimly_B B 310
2018/01/01 Faimly_B C 112
2018/01/01 Faimly_B C 249
2019/01/01 Faimly_A A 172
2019/01/01 Faimly_A A 74
2019/01/01 Faimly_A B 283
2019/01/01 Faimly_B B 361
2019/01/01 Faimly_B C 33
2019/01/01 Faimly_B C 444
2020/01/01 Faimly_A A 211
2020/01/01 Faimly_A A 149
2020/01/01 Faimly_A B 377
2020/01/01 Faimly_B B 405
2020/01/01 Faimly_B C 139
2020/01/01 Faimly_B C 125

 

Conditions :

I have another SCORCARD  to show only single year - filtered by another slicers of single-selecting 1 -Year slicer

and 2 - Group - the hierarchy slicers of column "Type Family" - "Type Sub"

 

Goal :

At the same time show ONLY ,1 -current selected year & 2- the previous year (y-1) based on the single-selecting 1 -Year slicers while keeping interactions with Hierarchy group slicer .

 

How can i achieve it ?

Image :

 

Capture.PNG

1 ACCEPTED SOLUTION

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

5 REPLIES 5
Ashish_Mathur
Super User
Super User

Hi,

I answered a similar question here - Flex a Pivot Table to show data for x months ended a certain user defined month.

Hope this helps


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi Ashish , appreciate for your reply and it is a very smart way to provide flexibility.

But my situation  aims to keep the easiest and intuitive UI that "select only the current year you wnat to view" hence you see to chart have only 2 bar as ell .  I need a measure to locking only 2 year in the chart .

Concept like   : 

# 2_years_period_measure =

    VAR current_year = selectedvalue(Calendar[Date].[year]) 

   RETURN

   filter(  current_year && current_year -1  )

hence use "2_years_period_measure"  in chart graph Axis .

But i lack of knowledge to accomplish it .

Hi,

You may download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Thankyou , amazing!

 

You are welcome.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

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.