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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hello,
I have a report which shows Last 30 days ,Last 90 and till last 366+days. The data will be shown based on Last day of activity slicer. So i want to calculate the data based on date which i will be giving , For example I have given today's date in slicer data should be calculated accordingly for last 30days , 60 days till last 366+days.
Help is appreciated
Thanks in advance
Hi @YasminYas,
I'd like to suggest you take a look at following blog, it told about use slicer and dax formula to display last n periodic of amount:
Slicers For Selecting Last "X" Periods
Regards,
Xiaoxin Sheng
Hi @YasminYas,
Without further specification on your needs and a sample of data is difficult to give you a good answer.
However I think you need to do something like:
Last 30 days =
CALCULATE (
SUM ( Table[Column] );
FILTER (
ALL ( Calendar[Date] );
Calendar[Date] <= MAX ( Calendar[Date] )
&& Calendar[Date]
>= MAX ( Calendar[Date] ) - 30
)
)
You should replace the 30 by the number that you need for the additional values.
Again without further information is difficult to help you.
Regards,
MFelix
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsCan I ask where should I apply this measure at? The measure works, but if I drop it into any card, slicer, the visual broke.
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsIt's "Invalid OADate value '64037098'. Accepted values are between -657435.0 and 2958465.99999"
Thank you
But my requirement is i need to create 4 calculated column for last 30 days, last 90 days, last 180 days. The values in the columns should get calculated every time with User input date. And the values for last 30 days should be 1 if last activity date is active other wise null.
How can i create these calculated columns with user input date selected in slicer?
Regards
Miguel Félix
Proud to be a Super User!
Check out my blog: Power BI em PortuguêsThe Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |