What is wrong with my chart with Google Chart API - google-visualization

My chart has a problem in showing data's information as an image below. Please let me know what causes the problem and how to address this one.
Problem: There were 2 strange columns of the Target and Actual Shipment for Week 40. For more details, the Actual Shipment column was 153100.50, be more than a half of the Target Shipment (300000.00). The Actual Shipment for Week 41 has shown nothing. While the Actual Shipment for Week 42 was very low as normal.
Data:
['WEEK','Target','Actual Shipment','Cum Target','Cum Actual Shipment'],
['Week 40',300000.00,153100.50,300000.00,153100.50],
['Week 41',300000.00,102800.11,600000.00,255900.61],
['Week 42',300000.00,106180.90,900000.00,362081.51]

The bars are correct, you've set the minValue to 100000, so e.g.
the ratio BlueBar : RedBar for Week 40 is 1 : 0.265
The red line you've drawn in the middle of the blue bar for Week 40 is at 200000, but the half of 300000 is 150000

Related

How to calculate ratio for every row in power bi?

Could someone please guide me through this situation?
I have a need to compute for every row the ratio between, volume of the row and sum of volumes of rows of a given transport type.
But after calculating this calculated column, I would like to use it in a table visualization, and be affected by any slicer of it...
Was I clear?
Here follows the example of rows:
Delivery Method Order Nr VOLUME Ratio
Air 50102258 9 33%
Sea 50091716 50 52%
Sea 50092425 47 48%
Air 50102257 18 67%
Here's your measure (a calculated column doesn't work here since you have to aggregate per method):
% Volume =
DIVIDE(
SUM('Table'[VOLUME]),
CALCULATE(
SUM('Table'[VOLUME]),
ALLEXCEPT('Table','Table'[Delivery Method])
)
)
If the answer was useful please accept it and give it an upvote.

PowerBI - visual with custom sorting and showing top 10 values

I have a dataset similar to the below
Description
ML Category
Value
ML3: Big red house
ML3
25
ML1: Small circle
ML1
10
blue bike
30
ML1: office chair
ML1
100
ML5: yellow keyboard
ML5
250
I am looking to have a table visual that includes any entries with an ML category of 1-5. I want to sort this visual on an ML code hierarchy e.g. ML1>ML2>ML3 etc. If there is more than 1 entry with the same ML code then I would like to sort by value highest to lowest. i.e. an ML1 entry with value of 100 would appear above an ML1 entry with value of 10.
After the visual has been sorted I want to only show the top 10 entries based on this sorting method. My ideal outcome for the above data set would be:
Description
ML Category
Value
ML1: office chair
ML1
100
ML1: Small circle
ML1
10
ML3: Big red house
ML3
25
ML5: yellow keyboard
ML5
250
This visual will be linked to a filter that may exclude some of the entries.
Any help would be greatly appreciated - cannot seem to workout a solution
Try these:
MLFilter = LEFT('Table'[ML Category], 2)
OrderColumn = CONCATENATE('Table'[ML Category], 1000000 - 'Table'[Value])
FilterColumnForTop10 =
RANKX (
FILTER ( 'Table', LEFT ( 'Table'[ML Category], 2 ) = "ML" ),
'Table'[OrderColumn],
'Table'[OrderColumn],
asc
)
Add MLFilter to "Filters on this visual" and filter it to "ML".
Add FilterColumnForTop10 to "Filters on this visual" and filter it to "is less than" = 11.
In the Fields blade, select the Description column and change its "Sort by column" to OrderColumn.
Assumptions:
My primary assumption is that your question is accurate. For example:
I have a dataset similar to the below
If the data in the table that follows is from a visualization, not from the source data, you may not get the same results. Likewise, if Value is an explicit measure, that could cause problems.

In Power BI, How can I plot a yeartarget (one number in a table) in fixed fractions over twelve months?

I have a bar chart that shows cumulative results per month over one year.
jan(5) feb(12) mar(15) apr(21).....dec(122)
I have a target value for that year. (120)
I don't like a horizontal line plotted as the target.
How do I plot it as a diagonal line from january to december?
ie if the target is 120 for the year I'd like to see a line going through 10 in jan, 20 in feb,..., 120 in dec.
In DAX I tried something like:
calculate(
sum(sales[target]),
FILTER(
ALL('Datetable'[monthnumber]),
'Datetable'[monthnumber] <= MAX(datetable[monthnumber]))
)```
It sounds like the Line and Stacked Column Visual might give you what you need.
You can make a target measure like I did in the picture below:
targetline = 10*SELECTEDVALUE('Calendar'[Month Number])

Monthly % change power bi

Hoping someone can help! Each month I receive a finance file, the total number of rows varies each month. The two columns of interest are financial_ref (which is a unique identifier for each month, though repeated across months) and outcome (which is either yes or no). A 100% stacked bar chart can show the yes/no% each month (axis = date, value = count(financial_ref), legend = outcome), but what I'd also like is a chart which can show the % difference each month. So if 'No' was 48% in March and 50% in April, I'd like a chart which shows +2% for 'no' for April, being the increase from the previous month (and likewise shows -2% for 'yes' for April). There's an additional column 'category' which stakeholders would use to filter any visualisations built. No idea where to start...

PBI - How to group by column name in pie chart along percentage (with values displayed)?

I'm having trouble with use group by on pie chart - maybe it can be done differently.
I have a simple pie chart with only 2 values: Name, and their values (grouped by the Name).
The values are an amount and not a percentage. (The percentage may be displayed as well, but only if the amount will be displayed also).
And I need to somehow (I guess with group by) rename all the Names where the percentage ratio in this chart lower than, for example, 10% to a different string, like Group_with_10per_or_lower.
Any ideas how this can be done?
For example, imagine having States and their values of something. USA = 350; Canada = 250, Brazil = 200, Argentina = 150, Chile = 50. And what you have is a pie chart with these data. But you need to rename all states having 20% or less ratio of this value (Brazil, Argentina, and Chile) as Other for example. So you would have the pie chart with USA, Canada, and Other (Brazil + Argentina + Chile) but still have their values displayed in the chart and not their %. It can be both, but not just %.
Let's say you have a table Table1(state, value)
Create a measure:
Total = CALCULATE(SUM(Table1[value]),All(Table1))
Create a calculated column:
state2 = IF([value]<[total]*0.2,"Other",[state])
Use state2 in your visualisation.