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

Same reports on different period of times

Hello world~

 

I have a report that shows data from the last hour (monitoring screen). But my client now want to have "Last Hour", "Last Day", "Last Week" and "Last Month" on the same report.

 

How would you guys do it without any filters?

 

PS: I get my data from SQL Queries.

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

hi, @Anonymous

When you get data from SQL Queries, you need to get data at least since last month (the data you need),

then use DAX Function to create multiple calculate measures separately. for "Last Hour", "Last Day", "Last Week" and "Last Month"

drag these measures into visual. they show together.

 

Also, you could share some sample data and expected output. we can help you to create these measure. Do mask sensitive data before uploading.

 

 

 

Best Regards,

Lin

Community Support Team _ Lin
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

7 REPLIES 7
themistoklis
Community Champion
Community Champion

@Anonymous

 

If there is no restriction of showing the data from each one of the time periods on the same object (e.g. table or chart) then there mltiple ways for displaying the require info.

 

1. Create a separate field for each one of the time periods on the SQL query and then load the data on the report. Then make copies of the same object 4 times (for each one of the time periods) and add the relevant field (created on the sql query) in te filter panel

 

2. Create the time periods using DAX formulas in PowerBi and repeat the same process afterwards with copying the objects and adding the filtering.

 

3. Create 4 slicers (one for each time period) and link every slicer to the relevant object without affecting the other objects

v-lili6-msft
Community Support
Community Support

hi, @Anonymous

When you get data from SQL Queries, you need to get data at least since last month (the data you need),

then use DAX Function to create multiple calculate measures separately. for "Last Hour", "Last Day", "Last Week" and "Last Month"

drag these measures into visual. they show together.

 

Also, you could share some sample data and expected output. we can help you to create these measure. Do mask sensitive data before uploading.

 

 

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hey @v-lili6-msft

 

For example here, we got :

Login.PNG

 

 

The script "login" was executed 4 times in the last hour with an 100% success rate. I need to do the same for last day.

Here I get my "Agent | Script" from the last month and the number of  loops and success rate for the hour ; therefore, if my script isn't executed in the last hour, it will show 0 loops.

 

I know I can make another query to get my data for "Last day", but is there another way?

 

PS: 

- My english might be bad (I'm not english ) Smiley Wink

- The project had to be done for today 4PM so don't take it too seriously, I won't make it on time (just want to know for further projects). Smiley Frustrated

- I didn't click on "Accept as Solution" on purpose... Smiley Indifferent

hi, @Anonymous

Does "Last Hour" is a script not a dax formula?

If it is a script, sorry I'm not familiar with scripts, you may post a new thread in Power bi Developer.

 

I know I can make another query to get my data for "Last day"

I think making another query is a good way for it.

 

you may try to continue to create  "Last Day", "Last Week" and "Last Month"  then

drag them into visual together.

 

Sorry for not being familiar with script development again.

 

Best Regards,

Lin

 

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
mwegener
Most Valuable Professional
Most Valuable Professional

Hi,
copy the visual and filter it on visual level.
Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


Anonymous
Not applicable

@mwegener

 

There is no "Last Hour filter"... It's what I wanted to do...

mwegener
Most Valuable Professional
Most Valuable Professional

... or create a query for each visual
Did I answer your question?
Please mark my post as solution, this will also help others.
Please give Kudos for support.

Marcus Wegener works as Full Stack Power BI Engineer at BI or DIE.
His mission is clear: "Get the most out of data, with Power BI."
twitter - LinkedIn - YouTube - website - podcast - Power BI Tutorials


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.