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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
tlmf2020
Regular Visitor

Dynamic column value form selected value in parameters

hi everyone,
I have table 

 

tlmf2020_0-1721486014997.png

 

I created new parameter for keyword and for score like

 

 

Keyword_para = {
("Keyword", NAMEOF('distinc_keyword'[Keyword]), 0)

new_score_para = GENERATESERIES(0, 50, 1)

 

my expectation create new column newScore 

example

when if user select keyword = Random 1 and Score = 25

 

NewScore colum will show

 

 

NewScore colum will show 

tlmf2020_2-1721486110513.png

 

 

 

when if user select keyword = Random 2 and Score = 30

 

NewScore colum will show

tlmf2020_1-1721486051215.png

 

I am using formular

newScore =
IF(
Sheet[Keyword] = SELECTEDVALUE('distinc_keyword' [Keyword]),
SELECTEDVALUE ( new_score_para[new-score] ),
Sheet2[Score]
)

but it doesnot work

any helps?

 

 

@MFelix

 

8 ACCEPTED SOLUTIONS
NaveenGandhi
Super User
Super User

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!!!

View solution in original post

tlmf2020
Regular Visitor

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

tlmf2020_0-1721498865718.png

 

View solution in original post

@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!!!

View solution in original post

tlmf2020
Regular Visitor

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

tlmf2020_0-1721504349303.png

expectation for output

tlmf2020_2-1721505008362.png

 

 

 

if we select

tlmf2020_3-1721504571896.png

 

tlmf2020_3-1721505030304.png

 

 

 

 

any helps?

 

View solution in original post

@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!!!

View solution in original post

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.

View solution in original post

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

tlmf2020_0-1721513325335.png

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

View solution in original post

tlmf2020
Regular Visitor
8 REPLIES 8
tlmf2020
Regular Visitor
tlmf2020
Regular Visitor

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

tlmf2020_0-1721504349303.png

expectation for output

tlmf2020_2-1721505008362.png

 

 

 

if we select

tlmf2020_3-1721504571896.png

 

tlmf2020_3-1721505030304.png

 

 

 

 

any helps?

 

@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!!!

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
Regular Visitor

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

tlmf2020_0-1721498865718.png

 

@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!!!
NaveenGandhi
Super User
Super User

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!!!

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

tlmf2020_0-1721513325335.png

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

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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