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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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