Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I also have a second visual - a matrix, which shows data for the previous EndOfMonth.
For example, if the user selects December 2024, the first visual would show data for every day of this month. The second matrix should show data for November 30th 2024 (previous end of month).
The filter works for the first visual but how can I retrieve the user's selected date to calculate the date for the second visual?
Solved! Go to Solution.
Thank you johnt75
Hi, @SonyaNadesan
Based on your description, I've created the following measure:
Measure = CALCULATE(SUM('Table'[Value]),DATEADD('DateTable'[Date],-1,MONTH))
Use it to create a visual as follows:
The results are as follows:
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thank you johnt75
Hi, @SonyaNadesan
Based on your description, I've created the following measure:
Measure = CALCULATE(SUM('Table'[Value]),DATEADD('DateTable'[Date],-1,MONTH))
Use it to create a visual as follows:
The results are as follows:
Best Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Thanks for your response!
However, I can't drop a measure into the columns section of the matrix. Any ideas why?
I think the simplest way would be to create a calculation group with a calculation item using the below DAX.
Prev End of Month =
VAR ReferenceDate =
MAX ( 'Date'[Date] )
VAR PrevEndOfMonth =
EOMONTH ( ReferenceDate, -1 )
VAR Result =
CALCULATE ( SELECTEDMEASURE (), TREATAS ( { PrevEndOfMonth }, 'Date'[Date] ) )
RETURN
Result
Apply the calculation group as a filter on the second matrix, and select the calculation item. This will then calculate any measure you put into the matrix as at the end of the previous month.
Vote for your favorite vizzies from the Power BI World Championship submissions!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 63 | |
| 53 | |
| 42 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 124 | |
| 105 | |
| 44 | |
| 32 | |
| 24 |