Forum Discussion
30 days count
for eg today is 26/10/2020
i want to the count of users
for last days 30 days in for each day
eg
25/9/2020-25/10/2020-482
24/9/2020-24/10/2020-442
23/9/2020-23/10/2020-342
5 Replies
- amitchandak
Super User
qwaiti27231 , one way is to use relative date filter at viusal level or a slicer
https://docs.microsoft.com/en-us/power-bi/visuals/desktop-slicer-filter-date-range
or try this way : https://www.youtube.com/watch?v=duMSovyosXE
- qwaiti27231
Helper III
i want it as graph for all the days
- amitchandak
Super User
qwaiti27231 , if you have a date in your table or join the date with your date table and use that. Both solution I suggested should give you trend.
- AnonymousNot applicable
Hi qwaiti27231
Due to I don't know your data model, I build a sample to have a test.
I think you may build a measure to calculate the running total in last 30 days for per day.
My Sample has Date column(2020/09/01 to 2020/10/28) and a value column.
My Measure:
Measure = VAR _PerDay = MAX ( Sheet2[Date] ) VAR _Last30Days = MAX ( Sheet2[Date] ) - 30 VAR _Sum30days = SUMX ( FILTER ( ALL ( Sheet2 ), Sheet2[Date] <= _PerDay && Sheet2[Date] >= _Last30Days ), Sheet2[Value] ) RETURN _Sum30daysResult:
You can download the pbix file from this link: 30 days count
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.