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
kbl1726
Advocate III
Advocate III

Limiting Date Ranges to Avoid Overlap

Hi All,

 

I'm working with financial data that comes out quarterly, consisting of foward looking figures (loan amounts and rates, for example), and therefore data points often overlap. I'd like to display the data that comes out each quarter as a time series, but only data points for the following 90 days from the end of a quarter, i.e., until new data comes out, in order to avoid overlap. This way, at the end of each quarter, I can see which loans are in effect over the next three months.  I can do that now but only for 1 period at a time. If I select multiple periods at a time, it stacks what are effectively duplicate data points. What I'd really like to do is see how those 90 day chunks change over time by limiting the date ranges displayed for each period. 

 

This data is reported at the end of each calendar quarter and is effective going forward.  So I'd like to limit any data disclosed at the end of Q1 2018 (March 31 2018) to the following 3 months, or Apr 1 to June 30 2018.  For Q2, I'd like to limit any data displayed to July 1 - Sept 30 2018, and so on. 

 

PeriodEffective StartEffective end
Q1 20184/1/20186/30/2018
Q2 20187/1/20189/30/2018
Q3 201810/1/201812/31/2018

 

My data is structured as follows.  Note that some start dates may be many months from the end of the quarter, such as the first row.  As the first row is not within Q1 2018's effective start/end, it would not be displayed.  Also, note that rows 3 and 5 are the same loan.  But I don't want the first instance of it to stretch from 4/1 to 9/30. Q1's effective range ends on 6/30, so that first instance would end at 6/30. The second instance, Q2, would run from 7/1 to 9/30. As I have it now, if multiple periods are selected, both instances of those loans are counted and stacked, so it looks like 2 loans across those dates. 

 

PeriodAmountInt. RateStartEnd
Q1 201816533.17/1/201812/31/2018
Q1 20181822.84/1/20186/30/2018
Q1 201831254.24/1/20189/30/2018
Q2 201816533.17/1/201812/31/2018
Q2 201831254.27/1/20189/30/2018
Q2 201812346.27/1/201812/31/2018
Q2 20185484.110/1/20183/31/2019
Q3 201816533.110/1/201812/31/2018

 

Ideally, my X-Axis would be the effective dates, not the full date range in the 2nd table, and the Y-Axis the loan volumes and/or rates.  Any help is greatly appreciated.  Many thanks. 

  

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi kbi,

As you described, I want to confirm with your requirements based on my understanding.

Do you want:

  1. when the ‘start date’ is not within QX 2018's ‘Effective Start/End’, it would not be displayed
  2. for dates displayed, each ‘end date’ should match the proper ‘Effective End’ by ‘period’.

If it is in this case, you could create DAX to meet your goal.

in your second table, create two calculated column to connect with your table1

effective start =RELATED ( Table1[Effective Start] )
effective end =RELATED ( Table1[Effective end] )

you will get the table like this

11.png

 

then create a new table

Table =
ADDCOLUMNS (
    FILTER (
        Table3,
        Table3[Start] >= Table3[effective start]
            && Table3[Start] <= Table3[effective end]
    ),
    "End2", IF ( Table3[End] <= Table3[effective end], Table3[End], Table3[effective end] )
)

finally,you will see

12.png

additionally,i don't understand  

 As I have it now, if multiple periods are selected, both instances of those loans are counted and stacked, so it looks like 2 loans across those dates. 

  

Ideally, my X-Axis would be the effective dates, not the full date range in the 2nd table, and the Y-Axis the loan volumes and/or rates.

  


could you kindly give me more details to understand better?

Regards,

Maggie

View solution in original post

1 REPLY 1
v-juanli-msft
Community Support
Community Support

Hi kbi,

As you described, I want to confirm with your requirements based on my understanding.

Do you want:

  1. when the ‘start date’ is not within QX 2018's ‘Effective Start/End’, it would not be displayed
  2. for dates displayed, each ‘end date’ should match the proper ‘Effective End’ by ‘period’.

If it is in this case, you could create DAX to meet your goal.

in your second table, create two calculated column to connect with your table1

effective start =RELATED ( Table1[Effective Start] )
effective end =RELATED ( Table1[Effective end] )

you will get the table like this

11.png

 

then create a new table

Table =
ADDCOLUMNS (
    FILTER (
        Table3,
        Table3[Start] >= Table3[effective start]
            && Table3[Start] <= Table3[effective end]
    ),
    "End2", IF ( Table3[End] <= Table3[effective end], Table3[End], Table3[effective end] )
)

finally,you will see

12.png

additionally,i don't understand  

 As I have it now, if multiple periods are selected, both instances of those loans are counted and stacked, so it looks like 2 loans across those dates. 

  

Ideally, my X-Axis would be the effective dates, not the full date range in the 2nd table, and the Y-Axis the loan volumes and/or rates.

  


could you kindly give me more details to understand better?

Regards,

Maggie

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.