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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Anonymous
Not applicable

Help! - Convert this measure to a calculated column to use in a lookup function.

oct2.PNGoct23.PNG

 

I have attached the measure and the Ranked table here.

 

How do I convert this measure into a column. my aim is to use the column for a lookup function.

 

Any help is appreciated.

 

THanks,

Anand!

 

 

 

1 ACCEPTED SOLUTION

Hi @Anonymous ,

 

below is the lookupmeasure using calculate, it filters the 2nd rank. 

 

If you filter Req Number 4, it will show March 2nd, which is the 2nd rank for Req Number 4.

 

Screenshot below

lookupmeasure = 
CALCULATETABLE(
    VALUES('Assign'[Start Date]),
    'Assign'[rank measure]=2
)

Screenshot 2019-10-09 at 4.16.13 PM.png

View solution in original post

8 REPLIES 8
lc_finance
Solution Sage
Solution Sage

Hi @Anonymous ,

 

 

you can try the following code. I checked it and it works for me

 

Let me know if it's also ok for you

 

LC

 

Measure 3 = 

RANKX(
    FILTER(
        'Assign',
        'Assign'[Req Num]= EARLIER(Assign[Req Num])
    ), 
    'Assign'[index],,ASC
)

 

Capture.PNG

Anonymous
Not applicable

Thank you so much! That worked fine.

But my ultimate goal would be to use that column for a lookup function. I can't, however use that. were you able to use that column in a lookup function after applying the filters?

qq.PNGqq1.PNG

hi, @Anonymous 

First, you should know that calculated column and calculate table can't be affected by any slicer.
Notice:
1. Calculation column/table not support dynamic changed based on filter or slicer.
2. Measure can be affected by filter/slicer, so you can use it to get dynamic summary result.

https://www.sqlbi.com/articles/calculated-columns-and-measures-in-dax/

 

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.
Anonymous
Not applicable

Thank you for your reply!

 

Then, how can we lookup for a value that changes dynamically?

Looking forward to hearing from you

 

Thanks,

Anand!

Hi @Anonymous ,

 

Can you share more on what you would like to obtain with the LOOKUPVALUE? possibly with an example

 

LC

Anonymous
Not applicable

Thank you for your reply!

For example -

I should lookup for the start date that corresponds to the second  rank after selecting the req number through the filters.

I wil then use that start date for another calculation.

Here - I'm selecting the req number 3:

So if I'm looking for 2nd rank I should get the value of Jan 10.

 

Looking forward to hearing from you.

Thanks,

 

Hi @Anonymous ,

 

below is the lookupmeasure using calculate, it filters the 2nd rank. 

 

If you filter Req Number 4, it will show March 2nd, which is the 2nd rank for Req Number 4.

 

Screenshot below

lookupmeasure = 
CALCULATETABLE(
    VALUES('Assign'[Start Date]),
    'Assign'[rank measure]=2
)

Screenshot 2019-10-09 at 4.16.13 PM.png

Anonymous
Not applicable

Thank you so much. That worked perfectly fine.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.