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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Reply
Anonymous
Not applicable

Based on Quarter Selection Previous 3 Quarter value needed

Hi all,

 

I have added the quarter as a filter in this filter if i select 2020 Q3 i need previous 3 quarter value visible in cluster column chart

saple data 

 

CountryJobValueDateQuarter
NetherlandsBusiness16/1/2019Q2
NetherlandsFinance16/1/2019Q2
United KingdomBusiness0.66/1/2019Q2
United KingdomBusiness0.66/1/2019Q2
NetherlandsBusiness0.99/1/2019Q3
NetherlandsBusiness19/1/2019Q3
NetherlandsFinance19/1/2019Q3
United KingdomBusiness11/1/2020Q1
United KingdomBusiness0.61/1/2020Q1
United KingdomBusiness11/1/2020Q1
United KingdomFinance0.84/1/2020Q2
United KingdomBusiness14/1/2020Q2
United KingdomBusiness14/1/2020Q2

 

how can I achieve this logic?

 

Thanks & Regards,

Rajesh R

1 ACCEPTED SOLUTION

@Anonymous ,

 

Change the measure:

_Value = 
VAR _selectedDate = MAX(D_Date[Date])
RETURN CALCULATE(SUM('Table'[Value]), FILTER('Table', 'Table'[Date] in DATESINPERIOD(D_Date[Date], _selectedDate, -4, QUARTER)))

 

Also, I've included a new line in the source for 2019 Q14 as 20191201.

 

Capture.PNG 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



View solution in original post

5 REPLIES 5
camargos88
Community Champion
Community Champion

Hi @Anonymous ,

 

Check the attached file.

The key point is to have a disconnected date table.



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not applicable

@camargos88

 

 if i select 2020 Q3  i need  selected quarter and previous 3 quarter value ie   2020 Q3,  2020 Q2,   2020 Q1 ,   2019 Q4

 

is this possible?

 

 

 

 

@Anonymous ,

 

Try this measure:

 

_Value = 
VAR _selectedDate = MAX(D_Date[Date])
RETURN CALCULATE(SUM('Table'[Value]), FILTER('Table', 'Table'[Date] in DATESINPERIOD(D_Date[Date], _selectedDate, -3, QUARTER)))

 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Anonymous
Not applicable

@camargos88 

 

Thanks for your response, i have tried your measure but it's not working

 

if i select 2020 Q3 previous 3 quarter value display 2020Q2, 2020Q1, 2019Q4

 

i have attached my pbix file click here,

 

 

 

Thanks 

Rajesh

@Anonymous ,

 

Change the measure:

_Value = 
VAR _selectedDate = MAX(D_Date[Date])
RETURN CALCULATE(SUM('Table'[Value]), FILTER('Table', 'Table'[Date] in DATESINPERIOD(D_Date[Date], _selectedDate, -4, QUARTER)))

 

Also, I've included a new line in the source for 2019 Q14 as 20191201.

 

Capture.PNG 



Did I answer your question? Mark my post as a solution!

Proud to be a Super User!



Helpful resources

Announcements
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors