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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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