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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
PowerBI-Newbie
Helper IV
Helper IV

Display Previous Data Based on User Selection Using Date and Periodic Calendar Tables

Hi,

I have the following data:

Calendar.JPGTable1.JPG

 

The first is the calendar table and the second is the data table. I have the two date columns linked but when I report, I need to report using the period column. The reporting is in the form of a filtered table and line graph, counting the number of times a particular Area and/or Sub-Area appears. E.g. below:

PeriodAreaCount
1Area 11
1Area 21
2Area 12
2Area 21

 

 

PeriodAreaSub-AreaCount
1Area 1Sub-Area 1a1
1Area 2Sub-Area 2a1
2Area 1Sub-Area 1a2
2Area 2Sub-Area 2a1

 

So when I select Period 1 from my related slicer, I should be able to see Period 1 data which I do. However, whenever I select Period 2 for example it only displays Period 2 and doesn't display Periods 1-2 which is what I want it to do. So the data for the line chart should display Period 1 to Period X, and X being the user selection.

 

Please note that the slicer is used to calculate other values other than producing the above outputs.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @PowerBI-Newbie,

It sounds like a common requirement to filter on the date range that generated from two date fields, perhaps you can take a look at the following link 'start date', 'end date' part.

Before You Post, Read This 

In addition, you can also try to create a calculated table to expand the date range from row table fields, then you can simply filter on the date range records:

Spread revenue across period based on start and end date, slice and dase this using different dates 

Regards,

Xiaoxin Sheng

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @PowerBI-Newbie,

It sounds like a common requirement to filter on the date range that generated from two date fields, perhaps you can take a look at the following link 'start date', 'end date' part.

Before You Post, Read This 

In addition, you can also try to create a calculated table to expand the date range from row table fields, then you can simply filter on the date range records:

Spread revenue across period based on start and end date, slice and dase this using different dates 

Regards,

Xiaoxin Sheng

amitchandak
Super User
Super User

@PowerBI-Newbie , Not very clear. If you can have incremental on period prefer to have YYYYPP .

 

Try like

Period Rank = RANKX(all('Date'),'Date'[year period],,ASC,Dense)
This Month = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Period Rank]=max('Date'[Period Rank])))
Last Month = CALCULATE(sum('order'[Qty]), FILTER(ALL('Date'),'Date'[Period Rank]=max('Date'[Period Rank])-1))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Hi @amitchandak , let me know what's unclear.

I'm trying to count the number of concerns raised in any given period for each Area or Sub-Area (depending on slicer selection)  and the result in given to me as a table and line graph - so the user selects Period 1 and all the concerns raised in Period 1 will be broken down by Area and Sub-Area; if they select Period 2 then it will show Period 1 as well as Period 2. The line graph will show the figure for Period 1 when Period 1 is selected, and it will show Periods 1 and 2 figures when Period 2 is selected.

 

I hope that makes sense.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Kudoed Authors