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, I am working on a project to get the average of the last 4 weeks' revenue on the given day of the week and at a given time.
For example, Assume today is Friday and I am checking my revenue at 4 PM (1-hour revenue from 3 PM to 4 PM). I want to compare it to the average of the last 4 Friday's data at 4 PM.
I have writtwen a DAX formula,
Everything is working fine except for the highlighted text in red. Here, vertica_output[time] is in time format ( column for every hour ex. 3PM, 4PM, etc..) now this hour(now()) ggivesme value in whole number format ( 1,2, 19,20, etc). So I am not getting desired output.
Can anyone please help me to change the RHS part to time format?
Thank you,
Attaching table for better understanding!!
Solved! Go to Solution.
hey @FreemanZ, Thanks for the suggestion. However, it did not work because RHS is in text format and LHS is in the time format. Although, I could figure out the solution.
vertica_output[time] = TIME(HOUR(now())-1,0,0))
I used the time time function here to convert hour(now())-1 in to the time function from whole number.
hey @FreemanZ, Thanks for the suggestion. However, it did not work because RHS is in text format and LHS is in the time format. Although, I could figure out the solution.
vertica_output[time] = TIME(HOUR(now())-1,0,0))
I used the time time function here to convert hour(now())-1 in to the time function from whole number.
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 |
---|---|
110 | |
97 | |
78 | |
64 | |
55 |
User | Count |
---|---|
143 | |
109 | |
89 | |
84 | |
66 |