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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
SaiSaranya1095
Regular Visitor

Show Past 7 quarters in the line chart even if the user select single quarter in the slicer

Hi ,

Can anyone please help me in solving this!!!!

  • I have a calendar table and fact table. In the line chart with Year qtr Field in the axis,7 fields in the values Field well in line chart And date  slicer is a hierarchy. So even if the user selects one qtr the line chart Must show the data from past 7 quarters. Please help me in this.
  •  
  • Thank you 20220107_172123.jpg

    20220107_172432.jpg
3 REPLIES 3
SaiSaranya1095
Regular Visitor

The above mentioned is the sample Data.

 

user selects a value from the Date hierarchy slicer from the Dimcalendar 'Date 'Slicer .

 

Line chart 

Axis - YearQtr (from Dim Calendar)

legend - Sub-Region(from Dim country)

Values - 90days,180days,D360days,D720days (From Fact Table)

 

Line chart must show  data past 7 qaurters even if the user selects single quarter from the Date Slicer.

i.e if user selects 2021  Qtr 4 from Date Slicer, line chart must show Data from 2020Q2 to 2021Q4 with respective values. 

Greg_Deckler
Super User
Super User

@SaiSaranya1095 You will need a measure that uses ALL and then filters back down to the correct values. Sorry, having trouble following, can you post sample data as text and expected output?
Not really enough information to go on, please first check if your issue is a common issue listed here: https://community.powerbi.com/t5/Community-Blog/Before-You-Post-Read-This/ba-p/1116882

Also, please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Region

CountryDate90days180days360days720 days>720 days  

 

Asia

Chinasunday,1 December 2019100200300400500  
AsiaHongKongsunday,1 December 2019200300400500600  
AsiaChinaMonday,1 june 2020900200300400500  
AsiaHongKongMonday,1 june 2020100300400500600  
          
(DimCalendar)         
DateYearQuarterMonthDayYear QtrYearmonth   
Tuesday,31 December 20192019Q4Dec312019Q42019.12   
Monday,30 December 20192019Q4Dec302019Q42019.12   
          
(Dim country)         
RegionSub regionCountry       
APchinachina       
APchinaHongkong       
          
          
          
          
          
          

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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