Forum Discussion

tlmf2020's avatar
tlmf2020
Regular Visitor
2 years ago
Solved

Dynamic column value form selected value in parameters

hi everyone, I have table      I created new parameter for keyword and for score like     Keyword_para = { ("Keyword", NAMEOF('distinc_keyword'[Keyword]), 0) new_score_para = GENERATES...
  • NaveenGandhi's avatar
    2 years ago

    Hi tlmf2020 

     Check the attached PBIX which has a working solution.

    Let me know if this is what you are expecting.
    If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

    Follow me on LinkedIn!!!

  • tlmf2020's avatar
    2 years ago

    hi NaveenGandhi ,
    that is very good solution. However I dont know why when we sum value didnot change.
    Do you have any suggestions?

     

  • NaveenGandhi's avatar
    NaveenGandhi
    2 years ago

    tlmf2020 

    Just update the measure as below.

    New Score =

    VAR SelectedKeyword = SELECTEDVALUE(Keyword_para[Keyword])
    VAR TableKeyword = SELECTEDVALUE('Table'[Keyword])
    VAR IndividualScore = SELECTEDVALUE(Score[Score])
    VAR NewScore = IF(SelectedKeyword = TableKeyword, IndividualScore, SUM('Table'[Score]))
    RETURN
    IF(
        ISINSCOPE('Table'[Keyword]),
        NewScore,
        SUMX('Table', IF(SelectedKeyword = 'Table'[Keyword], IndividualScore, 'Table'[Score]))
    )
    If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

    Follow me on LinkedIn!!!
  • tlmf2020's avatar
    2 years ago

    thanks NaveenGandhi ,
    it work, very nice solutions.
    now my case have situation
    what total change if  we select multiple keys and change multiple score,
    for example if we select all keywords with corresponding score

    expectation for output

     

     

     

    if we select

     

     

     

     

     

    any helps?

     

  • NaveenGandhi's avatar
    NaveenGandhi
    2 years ago

    tlmf2020 

    I have done it for 2 keywords&scores, You replicate it for others.

    If this post helps, then please consider Accept it as the solution to help the others find it more quickly. Appreciate you kudos!!

    Follow me on LinkedIn!!!

  • tlmf2020's avatar
    tlmf2020
    2 years ago

    excellent solutions NaveenGandhi , Really appriciate your help
    I am new with this community, thanks for let me know that I need to accept the solution.

  • tlmf2020's avatar
    tlmf2020
    2 years ago

    hi NaveenGandhi ,
    in the case we have fix keys how formular to calcualte new Scorce?

    I cannot attached ppx file here. so I've send you via LinkedIn.
    Hope you can help me to do it today.

    thank you so much for your helps