Forum Discussion

MIRZAMU's avatar
MIRZAMU
Frequent Visitor
4 years ago
Solved

Power BI Data Labels Error

Hi,

 

In my dashboard, I have selected my bar chart values to show as a % of GT, however when I filter on them by selecting an agents name, the value will go to 100% even though the value I want is still in the background (%GT). Is there a way to change this?

 

 

  • EDIT:
    MIRZAMU 
    So, it turn out. Using ALL() makes it difficult to use the Filter pane to filter out a person, but is good at crossfiltering. Using Allselected() in stead of ALL() is bad at cross filtering but good at using the filter pane so...

     

    you can create 3 measure

     

    Best Measure ever = 
    IF(
        COUNTROWS(ALLSELECTED('Table'[Name])) = 1, 
            [%GT Measure], //If a crossfilter selection is made
             [%GT Measure 2] //If no crossfilter
    )

     

     

     

    %GT Measure = 
    Var _SelectedWorker = 
        CALCULATE(
            SUM('Table'[PriceCheck])
        )
    
    Var _Total =CALCULATE(
        SUM('Table'[PriceCheck])
       // ,filter(ALL('Table'[Name]), 'Table'[Name] <> "Candy")
       ,ALL('Table'[Name])
    )
    Return
    
    DIVIDE(_SelectedWorker, _Total)

     

     

     

    %GT Measure 2 = 
    Var _SelectedWorker = 
        CALCULATE(
            SUM('Table'[PriceCheck])
        )
    
    Var _Total =CALCULATE(
        SUM('Table'[PriceCheck])
       // ,filter(ALL('Table'[Name]), 'Table'[Name] <> "Candy")
       ,ALLSELECTED('Table'[Name])
    )
    Return
    
    DIVIDE(_SelectedWorker, _Total)

     

    This set up should be good for both using the filter pane and cross filtering

11 Replies

  • Hi,

    Does changing the internactions between the visuals fix your problem?
    1-2. Go to format --> Edit Interactions

    3. Select the visual, that you use to cross filter

    4. Select Filter in stead of highligt

     

    • MIRZAMU's avatar
      MIRZAMU
      Frequent Visitor

      Hi,

       

      No it wouldn't unfortunately as the value would still show as 100%. I need it to show the %GT Value and not 100% when I filter.

       

      I have tried changing the interaction to filter rather than highlight but it still doesnt work

      • NickolajJessen's avatar
        NickolajJessen
        Solution Sage

        Allright, it's probably your measure then.

        Please share the %GT measure