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.
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.
Solved! Go to Solution.
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
@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
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
Hey @v-lili6-msft
For example here, we got :
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 )
- 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).
- I didn't click on "Accept as Solution" on purpose...
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
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
114 | |
100 | |
78 | |
75 | |
49 |
User | Count |
---|---|
145 | |
108 | |
107 | |
89 | |
61 |