Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
Hi Community,
I have a data set that contains transaction records based on a certain transaction dates. These transactions are reported as of a quarter end date.
Visualization: Data table
Based on my filter date selection, I would like my table to show all past transactions, up to my quarter end date.
For ex, I have 5 transaction as of date 2020 Q1 and 2 transactions as of date 2020 Q2.
When I filter on date 2020 Q1, table shows 5 transactions
When I filter on date 2020 Q2, the table should display 7 transactions (5 of prior quarter and 2 current)
Attaching a copy of the Sample PBIX
Thanks,
Brian
@AlexisOlson, Does this fall in your forte? Thanks 🙂
Solved! Go to Solution.
Hi @Anonymous
1. it's great that you have the same column in two tables,
2. then keep the 2 tables disconnected, and drag the column Quarter in Date table into slicer
3. create the filter measure by using Date column(type:date) and Quarter column(type:text) in your table Data, and drag it into the filter on this visual
filterMeasure =
VAR _selQ =
SELECTEDVALUE ( 'Date'[Quarter] )
VAR _selDate =
CALCULATE (
MAX ( Data[As Of Date] ),
FILTER ( ALL ( Data ), Data[As of Date - Year Quarter] = _selQ )
)
VAR _startDate =
DATE ( YEAR ( _selDate ), 1, 1 )
RETURN
IF (
ISBLANK ( _selQ ),
1,
IF (
MIN ( Data[As Of Date] ) >= _startDate
&& MIN ( Data[As Of Date] ) <= _selDate,
1,
0
)
)
result:
See sample file attached bellow.
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution✔️ to help the other members find it more quickly.
Hi @Anonymous
1. it's great that you have the same column in two tables,
2. then keep the 2 tables disconnected, and drag the column Quarter in Date table into slicer
3. create the filter measure by using Date column(type:date) and Quarter column(type:text) in your table Data, and drag it into the filter on this visual
filterMeasure =
VAR _selQ =
SELECTEDVALUE ( 'Date'[Quarter] )
VAR _selDate =
CALCULATE (
MAX ( Data[As Of Date] ),
FILTER ( ALL ( Data ), Data[As of Date - Year Quarter] = _selQ )
)
VAR _startDate =
DATE ( YEAR ( _selDate ), 1, 1 )
RETURN
IF (
ISBLANK ( _selQ ),
1,
IF (
MIN ( Data[As Of Date] ) >= _startDate
&& MIN ( Data[As Of Date] ) <= _selDate,
1,
0
)
)
result:
See sample file attached bellow.
Best Regards,
Community Support Team _ Tang
If this post helps, please consider Accept it as the solution✔️ to help the other members find it more quickly.
Thanks so much,
I incorporated the disconnected table and a simpler solution which is just check if date values are less than or equal to selected date then 1, else 0. Pulled this measure as a filter in the table and filtered to only 1's.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
65 | |
63 | |
52 | |
37 | |
36 |
User | Count |
---|---|
82 | |
67 | |
61 | |
46 | |
45 |