Forum Discussion

SEBot's avatar
SEBot
Frequent Visitor
6 years ago
Solved

What if Parameter for single row

Hello,

 

Is it possible to create a parameter with a generateseries (0,100,1) that only changes the value of a single row of a table? For example, I would want to be able to have a paramenter only for "Y" in column 1. So when I change the paramenter only the amount in column 2 would change for "Y"? Ultimatly I would want individual paramenters for X,Y, and Z.

 

Right now if I create a parament the amount in column 2 changes for X, Y, and Z.

 

Column 1Column 2 (Amount)
X0
Y0
Z0
  • Anonymous's avatar
    Anonymous
    6 years ago

    Hi SEBot,

    Currently, power bi does not support to create a dynamic calculated column/table based on filter/slicer.
    You need to create a measure formula with switch function to check each row label and return correspond selector table value:

    Measure = 
    SWITCH (
        SELECTEDVALUE ( 'Table'[Label] ),
        "a", SELECTEDVALUE ( PA[PA], SUM ( PA[PA] ) ),
        "b", SELECTEDVALUE ( PB[PB], SUM ( PB[PB] ) ),
        "c", SELECTEDVALUE ( PC[PC], SUM ( PC[PC] ) ),
        "d", SELECTEDVALUE ( PD[PD], SUM ( PD[PD] ) ),
        BLANK ()
    )
    

    Regards,

    Xiaoxin Sheng

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi SEBot,

    Currently, power bi does not support to create a dynamic calculated column/table based on filter/slicer.
    You need to create a measure formula with switch function to check each row label and return correspond selector table value:

    Measure = 
    SWITCH (
        SELECTEDVALUE ( 'Table'[Label] ),
        "a", SELECTEDVALUE ( PA[PA], SUM ( PA[PA] ) ),
        "b", SELECTEDVALUE ( PB[PB], SUM ( PB[PB] ) ),
        "c", SELECTEDVALUE ( PC[PC], SUM ( PC[PC] ) ),
        "d", SELECTEDVALUE ( PD[PD], SUM ( PD[PD] ) ),
        BLANK ()
    )
    

    Regards,

    Xiaoxin Sheng