cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper III
Helper III

Show stats from X day or month

Hi, I have data YTD on a chart.  At present, charts show the data by its months.  I will filter the months that have passed through visual filter.  Is there an auto way for the charts to show say, from current month less month? i.e.  June is current month, and i want stats to show from May 2020 onwards. 

 

Many thanks,

Patrick

3 REPLIES 3
Highlighted
Super User IX
Super User IX

Re: Show stats from X day or month

@PGAT , month very clear to me ,

 

Assume you have Month Year

Month Year =Format([Date],"MMM-YYYY")

Create a new column like

Month Year New =if([Date] >=Switch( True(),
eomonth([Date],0) >= eomonth(Today(),-1),"Last Month" ,
eomonth([Date],0) >= eomonth(Today(),0),"This Month" ,
Format([Date],"MMM-YYYY")
)

Sort it on

Month Year sort = FORMAT([Date],"yyyymm")

 

And Filter on Last Month, If need Last Month and This Month

Or have measure like

MTD QTY forced=
var _max = today()
var _min = minx(allselected('Date'),'Date'[Date])
return
calculate(Sum('order'[Qty]),filter(all('Date'),'Date'[Date]<=_max && 'Date'[Date]>=_min))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Helper III
Helper III

Re: Show stats from X day or month

Hi there Amitchandak, thank you for taking time. I will try. 

Highlighted
Community Support
Community Support

Re: Show stats from X day or month

Hi @PGAT ,

 

Does the amitchandak's answer make sense? If it works for you, please accept it as solution. If you still need help, please share some sample data and expected output. We will understand clearly.

 

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Upcoming Events

Upcoming Events

Wondering what events you could join or have an event to promote yourself? Check out our Upcoming Events.

Upcoming Events

Community Summit North America – Join Online!

Join this community-driven Power Platform digital event for unbiased support and problem-solving.

Community Blog

Community Blog

Visit our Community Blog for articles, guides, and information created by fellow community members.

Top Solution Authors