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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Noak
Helper IV
Helper IV

last night alerts

Hello,

I would like to count last night alerts and see the difference from 2 night ago .

 

How can I calculate it?.

night is between 22:00 PM to 6 AM.

 

 

thank yoy =).

BR,
Noa.
1 ACCEPTED SOLUTION
v-sihou-msft
Microsoft Employee
Microsoft Employee

@Noak

 

 

To count a night, you may add a flag column to tag if an entry is "night" or not.

 

IsNight=
IF ( [StartTime] <= TIME ( 22, 0, 0 ) && [EndTime] > TIME ( 6, 0, 0 ), 1, 0 )

Then you can count "1" values in above column.

 

 

What do you mean "difference from 2 nights ago"? Can you share some sample data and expected result?

 

Regards,

View solution in original post

3 REPLIES 3
v-sihou-msft
Microsoft Employee
Microsoft Employee

@Noak

 

 

To count a night, you may add a flag column to tag if an entry is "night" or not.

 

IsNight=
IF ( [StartTime] <= TIME ( 22, 0, 0 ) && [EndTime] > TIME ( 6, 0, 0 ), 1, 0 )

Then you can count "1" values in above column.

 

 

What do you mean "difference from 2 nights ago"? Can you share some sample data and expected result?

 

Regards,

Tnx for your replay @v-sihou-msft

 

I would like to compare tonigh amount of alerts to a night before amount of alerts and to present the changes in % (if theres an increase or decrease).

 

 

BR,
Noa.

Solved thank you @v-sihou-msft

BR,
Noa.

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.