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
Sedos101
Helper I
Helper I

Peaks and Troughs

Hi Everyone

 

if I have a set of data in a column and I want to be able to flag the peaks and troughs how would I go about writing that in power query?

 

I basically have the conditions I want to use that would flag a peak, for example if it went above a certain value and then dropped below that value that would be one peak...

 

Thanks in advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Sedos101 ,

Could you please provide some sample data(exclude sensitive data) and special example to illustrate your expected result? If you want to get the column base on some conditions in Power Query, you can refer the following links to get it.

Conditionals

if 2 > 1 then 2 else 1          // 2
if 1 = 1 then "yes" else "no"   // "yes"

Power Query if Statements

yingyinr_1-1665470087628.png

Mastering IF Statements in Power Query – Including Nested IF-Statements

Best Regards

View solution in original post

1 REPLY 1
Anonymous
Not applicable

Hi @Sedos101 ,

Could you please provide some sample data(exclude sensitive data) and special example to illustrate your expected result? If you want to get the column base on some conditions in Power Query, you can refer the following links to get it.

Conditionals

if 2 > 1 then 2 else 1          // 2
if 1 = 1 then "yes" else "no"   // "yes"

Power Query if Statements

yingyinr_1-1665470087628.png

Mastering IF Statements in Power Query – Including Nested IF-Statements

Best Regards

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!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.