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

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
d904490
Frequent Visitor

select the top values!

trying to select only the values which are 12 less than 160. example- name = 160, output = 160; otherwise take name whaich are less than or equal to ()160-12. I also have another table which returns this current target value i.e. 160 or the changed value if changes in future. so I try to pick the name values which are 12 less than my target. I am new to power bi, need urgent help, please.Untitled_les.png

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

Hi,@d904490 

    you can use this formula to add a column as like below:

Top5 = IF(CALCULATE(MAX(Table3[current match number]))-Table2[match_number]<=5,"Top 5")

basic data

 

table1

4.PNG

 

table2

5.PNG

Then you can filter the column Top5

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-lili6-msft
Community Support
Community Support

Hi,@d904490 

    you can use this formula to add a column as like below:

Top5 = IF(CALCULATE(MAX(Table3[current match number]))-Table2[match_number]<=5,"Top 5")

basic data

 

table1

4.PNG

 

table2

5.PNG

Then you can filter the column Top5

 

Best Regards,

Lin

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thanks. It worked for me!

v-lili6-msft
Community Support
Community Support

hi,@d904490 

    Your description is not clear, Please show us your desired result in the data sample? you can provide some data sample and the expected output or the pbix .You can upload it to OneDrive or Dropbox and post the link here. Do mask sensitive data before uploading. 

 

Best Regards,

Lin

 

 

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

please find the sample data and the desired output attached below.

Table 1:return the current match number. Example the current match number is 160 and next week  it will change to 161 and every week it changes to 1+
table 2:id, enddate, startdate, match number         
idendatestart datematch_number         
129/06/201825/06/2018151          
26/07/20182/07/2018152          
313/07/20189/07/2018153          
420/07/201816/07/2018154          
527/07/201823/07/2018155          
63/08/201830/07/2018156          
710/08/20186/07/2018157          
817/08/201813/07/2017158          
924/08/201820/07/2018159          
1031/08/201827/072018160          
              
Output:top 5 match_number <= current_match. i.e. only top 5 match_number <=160         
527/07/201823/07/2018155          
63/08/201830/07/2018156          
710/08/20186/07/2018157          
817/08/201813/07/2017158          
924/08/201820/07/2018159          
1031/08/201827/072018160          
              
              
              

Helpful resources

Announcements
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.

March Power BI Update Carousel

Power BI Community Update - March 2026

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