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
mdrammeh
Helper III
Helper III

Need help with Conditional Lookup

Need help with conditional lookup to group the following measures in Power Query and Power BI

  • Greater than 0 days but less than or equal to 40 days
  • Greater than 40 days but less than or equal to 56 days
  • Greater than 56 days but less than 366 days
5 REPLIES 5
KHorseman
Community Champion
Community Champion

You're going to need to be a lot more clear. Lookup what from where? What is supposed to be meeting these criteria and how are you defining them? What part of this do you want to do in Power Query? Measures don't exist in the query editor so that doesn't make sense.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Great point 🙂 I am including a table below with some sample data. The data is located in a database with millions of record. The lead days column is what I would like to group in Power Query or Power BI:

 

Engnr Lead DaysLookup
-362 
-362 
4964 
40 
40 
67 
-1064 
-21 
365 
1 
1 
1 
1 
1 
1 
1096 
4 
366 
366 
366 
366 
365 
1 
1 
1 
1 
0 
0 
3 
3 
3 
3 
-999 
-999 
2928 
0 

 

I hope this makes sense?

 

Thanks for the feedback

 

MD

What's supposed to happen in the Lookup column? What are you looking up? Where is it?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




The lookup is supposed to group the values in the column by:

 

  • Greater than 0 days but less than or equal to 40 days
  • Greater than 40 days but less than or equal to 56 days
  • Greater than 56 days but less than 366 days

Right now, I have only been able to create two with the conditional format feature. I need to be able to do the following using DAX in Power Query:

 

LookupHelp.PNG

It looks like you're just creating a bucket column. There's no lookup going on that I can see. You would just use a normal IF formula in DAX, identical to an Excel IF formula. IF(<condition>, <result if true>, <result if false>)





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.

Top Solution Authors