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

Dinamic Rolling 4 Quarters based on Year-Quarter Filter

Hi: I'm preety new in Power BI and I need to create a Bar Chart showing last 4 quarters depending on the Year-Quarter Selected.

 

I created the chart but it is static and it doiesn't work for the new requirement

 

The sample is like this: If I select in my filter 2018-Q4, the chart should show 2018-Q1, 2018-Q2,2018-Q3 and 2018-Q4, but If I select 2018-03 the chart should show 2018-Q3, 2018-Q2 2018-Q1 and 2017-Q4.

 

This is the chart I have now, I need the same but it has to be dinamic

BI.png

 

 

Any ideas how to create this?? Thanks in advanced, for your cooperation.

4 REPLIES 4
v-danhe-msft
Employee
Employee

Hi @Erica_Maidana,

Based on my test, you could refer to below steps:

Sample data:

1.PNG

Create a new table about your slicer:

Table = DISTINCT(Table1[Qtr])

1.PNG

Create a measure:

Measure 2 = CALCULATE(SUM(Table1[Value]),FILTER('Table1','Table1'[Qtr]<>MAX('Table'[Qtr])))

Now you could see the correct result:

1.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks @v-danhe-msft. I really appreciatte your help, but unfortunatly this doen't cover what I need. This is only based in Quarters for a particular year and I need this work for Year and Quarters. 

I means if I select for example 2018-Q3 , the chart has to show 2018-Q3, 2018-Q2, 2018-Q1 and 2017-Q4.

 

Any ideas how to achieve this???

 

Thank you so much, I don;t knoe where I can lookf for this. I am really lost here.

And other thing I forgot!. I have my calendar table connected to the main data with sales values. Connected by date of course.

 

Hi @Erica_Maidana,

You could modify the [Qtr] column in my row table:

Qtr = YEAR('Table1'[Date])&"-"&"Q" & FORMAT(Table1[Date],"Q")

1.PNG

Result:

1.PNG

You could also download the pbix file to have a view.

 

Regards,

Daniel He

 

 

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.