Forum Discussion

Prakash1050's avatar
Prakash1050
Helper III
3 years ago

Need DAX Measure

 Table A

Hi All,
     I need Dax measure without creating relationship.

     I have two tables Table A and Table B.

     Table A is above the Picture and Table B have ID Column. The ID column contains 1 to 100 numbers.

     Table B ID column and Table A Min, Max column should be connected.
      If ID column is 2 means I will show 1-3 yrs in table visualization from Maturity Profile Column same like that if ID is 3 means i will show 3-5 yrs.

     Please help me to done these measure.

     Thanks in Advance.

      I Used this below measure but shows only one Maturity Profile Value.

     

Years_ =
    var a = SELECTEDVALUE('Table B'[ID])
    var b = calculate(MAX('Table A'[Max]),'Table A'[Max] <=  a)
    var c = calculate(FIRSTNONBLANK('Table A'[Maturity Profile],1), 'Table A'[Max] = b)

Return c

2 Replies

  • Hi,

    I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

     

     

     

    Maturity category: =
    VAR _id =
        SELECTEDVALUE ( 'ID'[ID] )
    RETURN
        MAXX (
            FILTER (
                Profile,
                AND ( _id >= Profile[Min], Profile[Min] <> BLANK () )
                    && OR ( _id < Profile[Max], Profile[Max] = BLANK () )
            ),
            Profile[Maturity Profile]
        )
    
    • Prakash1050's avatar
      Prakash1050
      Helper III

      Hi Jihwan_Kim  ,
            Thank you for your response. This Measure is working but 0 and -1 values should not showing 0-1 year that is also need. Please help me to done this scenario.