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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
arvindyadav
Post Partisan
Post Partisan

How may I know Current Hour Data

Hi Team,

 

How may I know that the current hour of revenue of yesterdays or day before yesterdays in power bi.

and the data format is below where hour_id is hour:-

 

clipboard-image (2).png

1 ACCEPTED SOLUTION

Hi @arvindyadav ,

Please try the measure below.

today_rev = CALCULATE(MAX('Table'[Revenue]),FILTER('Table','Table'[date]=TODAY()))
yesterday = CALCULATE(MAX('Table'[Revenue]),DATEADD('Table'[date],-1,DAY))

Here is the output.

Capture.PNG

Best Regards,

Cherry

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

6 REPLIES 6
mussaenda
Super User
Super User

Please elaborate what you really needed. Provide a sample output to answer you questions faster.

Thank you.

Hi @mussaenda ,

 

Suppose we have data which have hours, date and revenue column in it. and from that, I want to create a dynamic table like if the todays current hour is 6 and I want to know what is revenue in this current on yesterdays.

Please find the image.

Note- don't want to use any filter.

Required.PNG

Thanks,

Arvind

Hi @arvindyadav ,

Please try the measure below.

today_rev = CALCULATE(MAX('Table'[Revenue]),FILTER('Table','Table'[date]=TODAY()))
yesterday = CALCULATE(MAX('Table'[Revenue]),DATEADD('Table'[date],-1,DAY))

Here is the output.

Capture.PNG

Best Regards,

Cherry

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

Hi @v-piga-msft ,

 

Thank You So Much :v:

It is working fine.

vminvsky
Frequent Visitor

Two things. One you can simply create a new measure that's a sum of revenue. Then create a graphic with hour ID on X-axis and add a filter where you can select the day. Alternatively, you can create a new table using the summarize function. In your case it would be 

By Hour = SUMMARIZE(table_name <- this is ur table name, date column, hour_id column, "Revenue", sum(revenue column))

Hi @vminvsky ,

 

Didn't understand anything from your message.

can you please explain me clearly?

 

Thanks,

Arvind

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.