Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join 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.

Reply
Anonymous
Not applicable

Display START DATE of month for last 6 months when any date is selected in slicer

Hello Team,

 

START date of the month should display for last 6 months rows when any date is selected in slicer

 

ex: 

Slicer: sep 2021, oct 202, nov 2021

Expected output: 

Selected Nov 2021 in slicer

OP: 11/1/2021 for last 6 months rows

 

Selected Oct 2021 in slicer

OP: 10/1/2021 for last 6 months rows

 

Selected Sep 2021 in slicer

OP: 9/1/2021 for last 6 months rows

thimmaraju_0-1638939304063.png

 

thimmaraju_1-1638939580786.png

 

1 ACCEPTED SOLUTION

@Anonymous , Assume month coming from table have date then you can start of month like

 

eomonth(Maxx(allselected('Date'), 'Date'[Date]) ,-1)+1

 

rolling 6 month measure

Rolling 6 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-6,MONTH))

 

but prefer to use date table

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

6 REPLIES 6
VahidDM
Super User
Super User

Hi @Anonymous 

 

Can you post sample data as text and expected output?
It's not that clear at least for me!

please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490

The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
4. Relation between your tables

Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/

Anonymous
Not applicable

its working as amitchandak suggested to me like eomonth(maxx(date),-1)+1)...im getting expected results

amitchandak
Super User
Super User

@Anonymous , if you select a date and want data more than that, you need an independent date slicer

 

Check this

Need of an Independent Date Table:https://www.youtube.com/watch?v=44fGGmg9fHI

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hello @amitchandak I have gone through the above video, that is not working for my scenario...

 

if i create MEASURE for displaying STARTING date of the month when date is selected in slicer 

 

then i have to use another measure for another type of calculation....if i use date range slicer then it wont work....

 

below is the spotfire results.... i have selected SEP 2021 month in slicer of spotfire then its returning 9/1/2021 for last 6 months rows... i required this dax. could you please help me out on this..

thimmaraju_0-1638945022239.png

 

@Anonymous , Assume month coming from table have date then you can start of month like

 

eomonth(Maxx(allselected('Date'), 'Date'[Date]) ,-1)+1

 

rolling 6 month measure

Rolling 6 = CALCULATE(sum(Sales[Sales Amount]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),-6,MONTH))

 

but prefer to use date table

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

@amitchandak , still getting error for max function is accepts column but not rows..can we connect on this for 10mins...its urgent requirement

 

 

thimmaraju_0-1638954993413.png

 

 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.