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
sunjin122
Helper I
Helper I

how to make a daily report?

I am trying to make a Warehouse Daily (prior day & today) Reports. The Date column contains data from 2004 till now. Are there any smart ways to make the reports? I can only think of using the Date slicer to choose the certain day, howerver, it works not so well due to the large dataset. Plus, using the Date slicer is not straightforward and efficient for the manager who only requires data of prior day and current day. Hope some one can give me some smart advice, thanks aheadSmiley Happy

Capture4.PNG

2 ACCEPTED SOLUTIONS
ankitpatira
Community Champion
Community Champion

@sunjin122 few ways to do it, depends on which one you prefer. you can do at data source level ie import only today's and previous day data. if not possible at data source level then create calculated column in power bi desktop that contains value Y or N. Y or if date range falls within current and previous day and N for otherwise. then use page level filter to filter out N from that calculated column.

View solution in original post

Eric_Zhang
Employee
Employee

@sunjin122

 

You can also filter the data in Power Query. One way

 

#"Filtered Rows" = Table.SelectRows(#"tableName", each [date] >= Date.From(DateTimeZone.UtcNow()+#duration(0,8,0,0)+#duration(-1,0,0,0)))

 

Date.From(DateTimeZone.UtcNow()+#duration(0,8,0,0)+#duration(-1,0,0,0)) returns the previous day. 8 indicates the timezone offset while -1 the previous day.

View solution in original post

2 REPLIES 2
Eric_Zhang
Employee
Employee

@sunjin122

 

You can also filter the data in Power Query. One way

 

#"Filtered Rows" = Table.SelectRows(#"tableName", each [date] >= Date.From(DateTimeZone.UtcNow()+#duration(0,8,0,0)+#duration(-1,0,0,0)))

 

Date.From(DateTimeZone.UtcNow()+#duration(0,8,0,0)+#duration(-1,0,0,0)) returns the previous day. 8 indicates the timezone offset while -1 the previous day.

ankitpatira
Community Champion
Community Champion

@sunjin122 few ways to do it, depends on which one you prefer. you can do at data source level ie import only today's and previous day data. if not possible at data source level then create calculated column in power bi desktop that contains value Y or N. Y or if date range falls within current and previous day and N for otherwise. then use page level filter to filter out N from that calculated column.

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.