Forum Discussion

e2liu77's avatar
e2liu77
Icon for Helper I rankHelper I
2 years ago

Duplicated entries when set multipe selection in filter

Hi,

 

I have a Table A contains 2 columns - Internal Severity, external Severity. They have same value options (Low, Medium, High, Critical). I created another table B with 1 column of SeverityValue (Low, Medium, High, Critical)

A:

Problem IDInternal SeverityExternal Severity
1CriticalHigh
2MediumMedium
3LowCritical
4HighLow
5HighMedium

 

B:

SeverityValue

Critical

High
Medium
Low

 

I have a measurement X=Caculate([measure1], A[Internal Severity] IN allselected (B[SeverityValue])

 

I set B[SeverityValue] as a page filter. When choosing a single value from B[SeverityValue] 

When choosing a single value from this filter, the table visualization works well. But if I select multiple entries,.

Single value : Critical

Problem IDInternal SeverityExternal SeveritySeverityValueX
1CriticalHighCritical1

 

Multiple value: Critical, High

Problem IDInternal SeverityExternal SeveritySeverity ValueX
1CriticalHighCritical1
1CriticalHighHigh1
4HighLowCritical1
4HighLowHigh1
5HighMediumCritical1
5HighMediumHigh1

 

My expected result is:

Problem IDInternal SeverityExternal SeveritySeverity ValueX
1CriticalHighCritical1
4HighLowHigh1
5HighMediumHigh1

 

Can someone help what I should change in my implementation?

 

Thanks!

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    HI e2liu77,

    I'm not so clear for your requirement, can you please explain more about the logic to output the expected result? They should help us clarify your scenario and test to coding formula.

    How to Get Your Question Answered Quickly  

    Regards,

    Xiaoxin Sheng

    • e2liu77's avatar
      e2liu77
      Icon for Helper I rankHelper I

      Hi Anonymous ,

       

      Thanks for your quick reply.

       

      Simply saying, I have 2 columns (Internal Severity/External Severity) in table A with same value ranges (Low, Medium, High, Critical). I created another table B with the same values as a filter (SeverityValue). I want to show the measurements related to these 2 columns in one visualization with the second table B SeverityValue as a page filter. 

       

      In the measurement 1, I use:

      CALCULATE(
          [measuremnt related to Internal Severity],
          'A'[Internal Severity] IN allselected ('B'[SeverityValue]), ...........)

       

      When I choose a single value from filter B SeverityValue, the table format visualization shows the correct selected values. But if I choose multiple values from filter SeverityValue, the table visualization will show each entry "mutiple" times. 

       

      I wondered whether it is because there is no directly relationship between B SeverityValue and Table A. Do we have anyway to show only desired entries (without multiples) when choosing muitple values from SeverityValue.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi e2liu77,

        I'd like to suggest you create a new measure formula to compare two field values(Internal Severity and your measure formula) and return flag, then you can use this measure on ‘visual level filter’ to use flag as condition to filter not matched records.

        Regards,

        Xiaoxin Sheng