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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
rohazi
Frequent Visitor

how to get different value between hour

please help how to get diff value for hour by hour. 

 

rohazi_0-1673096766945.png

 

1 ACCEPTED SOLUTION
FreemanZ
Super User
Super User

hi @rohazi 

try to add a column like this:

Diff2 = 
VAR _time = [Time]
VAR _date = [Date]
VAR _table =
FILTER(TableName, TableName[Date] = _date)
VAR _maxtime =
MINX(
    FILTER(
       _table,
        TableName[Time] > _time
    ),
    TableName[Time]
)
VAR _totalpre=
MAXX(
    FILTER(
       _table,
        TableName[Time] =_maxtime
    ),
    TableName[total]
)
RETURN
[Total] - _totalpre

 

it worked like this:

FreemanZ_0-1673100796220.png

View solution in original post

6 REPLIES 6
FreemanZ
Super User
Super User

hi @rohazi 

try to add a column like this:

Diff2 = 
VAR _time = [Time]
VAR _date = [Date]
VAR _table =
FILTER(TableName, TableName[Date] = _date)
VAR _maxtime =
MINX(
    FILTER(
       _table,
        TableName[Time] > _time
    ),
    TableName[Time]
)
VAR _totalpre=
MAXX(
    FILTER(
       _table,
        TableName[Time] =_maxtime
    ),
    TableName[total]
)
RETURN
[Total] - _totalpre

 

it worked like this:

FreemanZ_0-1673100796220.png

tq @FreemanZ  . it's working ..thanks for your help.

rohazi
Frequent Visitor

69706 -58277

rohazi
Frequent Visitor

60706 - 58277

FreemanZ
Super User
Super User

hi @rohazi 

58277 - 69706?

yes

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

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.