Forum Discussion

PBI_Rookie's avatar
PBI_Rookie
Helper I
4 years ago
Solved

Control Charting-ALLSELECTED

Hello All,

 

I've previosuly created control charts using a dataset with only the data needed. I am now trying to use the same measures to create the control charts where the data needed is only a subset. 

 

I am using 4 measures, the two below and one to make the upper and lower limits. 

 

ControlChart Average = CALCULATE(AVERAGEX(TABLE, COLUMN with data needed),ALLSELECTED(Identifier I want to sort by]))
 
ControlChart STDDev = CALCULATE(STDEVX.P(Table],column with data needed),ALLSELECTED(identifier i want to sort by)
 
My issue is that while I'm getting the correct values, my chart is including identifiers that aren't tied to the data. My x-axis is the sample field used in the ALLSELECTED. 
 
If I use ALLSELECTED I get x-axis labels that aren't relevant. If I don't use ALLSELECTED I get the values calculated for each datapoint and not the whole range. 
 
Without ALLSECLTED

 With ALLSELECTED

 

 Any suggestions?
 
Thanks
  • PBI_Rookie's avatar
    PBI_Rookie
    4 years ago

    I was finally able to get this to work. 

     

    I used AllSELECTED as I described initially. What I had to do to make it work however was to duplicate my source table and filter it to be only the needed information. In this case the sample IDs. 

8 Replies

  • littlemojopuppy's avatar
    littlemojopuppy
    Community Champion

    Hi!  Try changing ALLSELECTED() to KEEPFILTERS(Identifier I want to sort by]).

    • PBI_Rookie's avatar
      PBI_Rookie
      Helper I

      Hi, 

       

      Ok I tried replacing the ALLSLECTED in both measures with KEEPFILTERS. I get an error that "Cannot convert value (identifier) of type TEXT to type True/False"

       

       

      • littlemojopuppy's avatar
        littlemojopuppy
        Community Champion

        😮  Well that is certainly an unusual error message...

         

        Can you provide some sample data to play with?

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi PBI_Rookie ,

     

    Has your problem been solved? If it has been solved, please accept the correct reply as the standard answer to help the other members find it more quickly.Thank you very much for your kind cooperation!

     

     

     

     

     

    Community Support Team _ Caitlyn Yan


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