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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MK_Process
Helper I
Helper I

Date Table for For the Day / For the Month

Hi

We have the colum name " Closing Date ".

Based on this date can we create a Data Table for " For the Day". and "For the Month".

WHich means the data what we need is from the date list, everyday it should show the data from for the day and for the month.

 

1 ACCEPTED SOLUTION
v-rzhou-msft
Community Support
Community Support

Hi @MK_Process 

You can get the data for the day or the month by measure.

Due to I don't know your table, I build a sample table with Close Date column and Data column to have a test.

Build a Calendar table by dax.

Slicer = ADDCOLUMNS(CALENDARAUTO(),"Month",MONTH([Date]))

Measure:

For the Day = 
Var _SelDate = SELECTEDVALUE(Slicer[Date])
Return
SUMX(FILTER('Table','Table'[Close Date]= _SelDate),'Table'[Data])
For the Month = 
Var _SelMon = SELECTEDVALUE(Slicer[Month])
Return
SUMX(FILTER('Table',MONTH('Table'[Close Date])= _SelMon),'Table'[Data])

Then build two table visuals and slicers to show the result.

For the day:

2.png

For the Month:

1.png

You can download the pbix file from this link: Date Table for For the Day / For the Month

 

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. 

View solution in original post

3 REPLIES 3
v-rzhou-msft
Community Support
Community Support

Hi @MK_Process 

Could you tell me if your problem has been solved? If it is, kindly Accept it as the solution. More people will benefit from it. Or you are still confused about it, please provide me with more details about your table and your problem or share me with your pbix file from your Onedrive for Business.

 

Best Regards,

Rico Zhou

v-rzhou-msft
Community Support
Community Support

Hi @MK_Process 

You can get the data for the day or the month by measure.

Due to I don't know your table, I build a sample table with Close Date column and Data column to have a test.

Build a Calendar table by dax.

Slicer = ADDCOLUMNS(CALENDARAUTO(),"Month",MONTH([Date]))

Measure:

For the Day = 
Var _SelDate = SELECTEDVALUE(Slicer[Date])
Return
SUMX(FILTER('Table','Table'[Close Date]= _SelDate),'Table'[Data])
For the Month = 
Var _SelMon = SELECTEDVALUE(Slicer[Month])
Return
SUMX(FILTER('Table',MONTH('Table'[Close Date])= _SelMon),'Table'[Data])

Then build two table visuals and slicers to show the result.

For the day:

2.png

For the Month:

1.png

You can download the pbix file from this link: Date Table for For the Day / For the Month

 

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. 

speedramps
Super User
Super User

Please watch this video about calendar tables and then use a day or month offset = 0 to just select the current day or all the days for the current month as required.

Watch this video 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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