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
NewInThis
Regular Visitor

DAX measure - chart with current time

Hi, 

I have to present column chart that shows how many deliveries was done hourly. 

The data that I am using will be refreshed evey hour.  

I would like to show on the chart the period of 24 hours, distributed hourly, on the most recent date. 

What I manage to do (with my begginer skills) is to create a measure that show the max of date. The issue is that If I refresh the data around 4PM it takes the value for the next hours from the day before and I would like to leave it empty. 

Do you have any ideas how to resolve that? My intuiton tells me that I should use a refference to current time but have no idea what to do with that. 

1 ACCEPTED SOLUTION

@NewInThis oh, so just add to your date table or whatever table you have the date column a flag column that checks for the last date and filter it by this. 
If you don't succeed we can do a zoom call and I'll show you.

View solution in original post

3 REPLIES 3
SpartaBI
Community Champion
Community Champion

@NewInThis If you have a column of date and another column of the hour for each delivery then it is straightforward. It will be best practice anyway to have these in dimension tables but if you are very new and just need to plot it on a chart than just the columns are enough. Put both of them on the X axis and the meaure the counts the deliveries on the Y axis / value and you should get what you need (make sure to expand to next level the X axis to see both the dates and the hour.



2022-05-19 17_30_22-Re_ Need help on DAX function with measure vs colu... - Microsoft Power BI Commu.png


Full-Logo11.png

SpartaBI_3-1652115470761.png   SpartaBI_1-1652115142093.png   SpartaBI_2-1652115154505.png

Showcase Report – Contoso By SpartaBI

Thank you for the reply. Unfortunately this is not exactly what I need.
The propsed solution gives me this:

 

NewInThis_0-1659000356884.png

And I want this (please ignore red line):

 

NewInThis_1-1659000394285.png

 

So I want to have view for only one day (24h), and it have to be the max date from the data.

 

@NewInThis oh, so just add to your date table or whatever table you have the date column a flag column that checks for the last date and filter it by this. 
If you don't succeed we can do a zoom call and I'll show you.

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.

Top Solution Authors