Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago

Need support on SELECTEDVALUE

Hi,

Can someone help me here, i have two below table.

3K Table:

SBU Table

Currently Result :

I have a challange, my 3k Table have 119 customer, So some other cusotmer done business in diferent SBU. i have created relationship with SBUname to 3k table when i am select the AV sbu its only 3 Customer done business in the Green+ remaining Null(No Business). so here i want that No Business all should come red count.

if i select AV. Only 3 is reflecting 116 is not reflecting.

Looking result:

 

 

 

5 Replies

  • Hi Anonymous ,

    It seems this can be handled using DAX. Can you share the file with sample data?

     

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous ,

    Based on the testing, please try the following methods:

    1.Create the sample table.

    2.Delete the relationship between 3k table and sbu table.

    3.Create the measure to calculate the selectedvalue.

    CustomerCount = 
    var _sbu = SELECTEDVALUE('3K Table'[FinalSUB])
    VAR _result = CALCULATE(COUNTROWS('3K Table'), '3K Table'[SBU Name] = SELECTEDVALUE('SBU Table'[FinalSu]))
    RETURN
    IF(_sbu = SELECTEDVALUE('3K Table'[SBU Name]), COUNTROWS('3K Table'), _result)
    

    4.Select AV. The result is shown below.

     

    Best Regards,

    Wisdom Wu

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi  Wisdom, 

      Thank you for supporting , but if i select AV  Green+ is 3 remaining should be show in RED like below image

       

  • Anonymous's avatar
    Anonymous
    Not applicable

    Team Can any one help me 

    If selectedvalues is true then should bring column A Green+, If not then Column A RED