My question is similar to this question here:
https://community.powerbi.com/t5/Desktop/Multi-variable-Scatter-Plot/m-p/312013#M138304
I understand that you can only display one variable on the x-axis of a PowerBI scatterplot. But, I'm trying to figure out if there's a way to toggle on/off multiple variables on the scatterplot. For example, the Y-Axis wouldn't change, but you could add/remove different variables to display on the x-axis.
My variables are all in date format, so it would be great to overlay different variables on the x-axis, i.e. "event1", "event2", "event3", so that you could see them in relation to one another. Is this possible? PowerBI has virtually no documentation that I can find.
I'm not sure about multiple variables, but you can at least change the variable to display in the axis based on a slicer.
The steps:
Create 2 new tables, each representing the possible values on each axis (Just the labels and an index);
Create measures with the values you'll want to see in the axis (ex: Total Sales);
In each table, create a new Measure with a Switch that maps the labels to the created measures.
Ex:
Measure Selection I =
IF(ISCROSSFILTERED('Measure Selection I'[Measure I]);
SWITCH(
TRUE();
VALUES('Measure Selection I'[Measure I]) = "Danceability";[Total Danceability];
VALUES('Measure Selection I'[Measure I]) = "Energy";[Total Energy];
);
Blank())
Create the Visual and the slicers, and put the created measures in the corresponding places.
Here is a video with an example:
https://www.youtube.com/watch?v=gYbGNeYD4OY
Related
I am very new to Power BI and I have this requirement to format the table which is not conditional formatting but kind a hard coding formatting.
First Row Column 1 is Yellow, Columns 2, 3 and 4 are Red
Second Row Column 1 is Green, Column 2 and 3 are Yellow, Column 4 is Red
Third Row Column 1, 2, 3 and 4 are Green
Fourth Row No Colour
I have also attached the pic below
I guess this is not possible. The reason is, all columns are generated dynamically based on your data in the table. That's why you need to apply conditions to color cells as you want.
Now, as you showed in the sample presentation, if you have that fixed amount of rows and columns with known fixed values in different cells, you can use CARD visual for each individual value to show and then use your expected background.Not a good approach, but the end user will see the expected output :)
How do i only show data points for the low and high? Every other data point can be hovered over to get their value but by default just the low and high should always show with custom tooltip
I was able to find a solution in case this helps anyone else out.
as i generate my xData and yData from api, i then grab min/max value from array
then i loop thru yData array and pull out the index of the min/max
as i'm initializing line chart, i used a function for pointRadius in the datasets that sets the dot to 10 if it's low or high, if not set it to 0 so it doesn't show
I want to change the background color for specific rows in a matrix based on the name of the row.
Here is my matrix
What I did so far was to create a conditional column X in the data table that says, for example, when asset_name is A82 give me 1, in all other cases give me 0. Then for each field in Values, I created a conditional rule based on that X column -
when column X is 1 - blue color, when is 0 - white color. Basically, I apply conditional background color for the columns. However, I want to be able to conditionally color the rows. There is no option to choose a background color for the fields in Rows. Therefore, I'm able to custom-color only the column part of the matrix.
Is there any workaround for this?
Could you use something like this - you can conditionally format a row based on the value of a measure https://www.cloudfronts.com/conditional-formatting-by-row-in-a-matrix/
i have a chart that fills itself with values, however currently i am limited on how many values i can display by the amount of label values i insert.
$scope.AxirsLabels = [1,2,3,4,5,6,7,8,9,10];
for example with the above label value i can only display 10 different values on the chart.
is it possible to set an unlimited amount of values based on the values of data?
each data value is an integer like 10 or 20 etc.
everytime the user clicks a button values are added to the data of the chart and the X axis needs to adjust.
Fixed it by using the function i use for adding data to the chart for the label values as well. this adds label values based on the amount of data values there are.
$scope.AxirsLabels = getDataProp('values');
There was a similar question to this before (how to prevent midpoints from extending), but does not answer my question.
I'm creating a histogram as follows and outputting it to a PNG file:
ods graphics on / imagename = "histoOne" imagefmt = png reset=index border=off width=4in;
ods select where=(_name_ ? 'Histogr');
proc univariate data=myData noprint; *(WHERE=(sumStake < 250));
Title1;
var sumStake;
histogram sumStake / name='histogr' vminor=4 grid lgrid=34 endpoints=0 to 250 by 20 cfill=red;
*Omit the inset, because the stats refer to the reduced dataset;
INSET n (comma11.0) mean (5.2) median (5.2) std='Std Dev'(5.2) max='Max' (5.2) / pos = ne
header = 'Summary Statistics' cfill = ywh;
run;
ods graphics off;
I want to display both the histogram and the summary statistics inset. However, the data is so skewed, that it makes no sense to show the maximum value for sumStake on the X-Axis. I want to cap the X-Axis at 250.
SAS keeps extending the ENDPOINTS value. How can I suppress this?
I don't want to use the (WHERE=(sumStake < 250)); filter as the count, mean, median and max in the inset will be based on the reduced sample, rather than the entire sample and will make no sense.
You may need to change your data in some fashion, or do the graph in a different way. Histograms in SAS don't allow much mucking about with the data in this fashion; you have to do it ahead of time. Histograms are meant largely for showing how your data falls out, so it's a bit counterintuitive to 'hide' some of the data fallout - I understand why you want to, but it is not exactly the primary purpose of histograms, hence why the functionality isn't there in SAS.
I don't think in any event that PROC UNIVARIATE gives you any ability to control this, so you may lose the inset. You can control the axis length explicitly in PROC SGPLOT histograms (with an AXIS statement in PROC SGPLOT), but they don't have the same kind of inset - you could make something probably, but not as simply. It also will still make the oversized bins, and won't reallocate those over-binned records.
Another option, particularly if you're making the inset separately anyway, would be to do the SGPLOT histogram (or bar chart) with data you've 'fixed' (right censored) and calculate the inset data separately (on the uncensored data).