Forum Discussion
CC__123
5 years agoFrequent Visitor
How to create a chart that shows a decrease over time without a date variable
Hi all, I'm new to Power BI and I can't figure out how to create a chart (preferably an area or line chart) which shows the decrease in number of participants (in %) over a period of time, withou...
- 5 years ago
CC__123 -
Unpivot your table using Power Query:
let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WCkgtKs7PUzBU0lHCxLE6cAVGWBQYICswRpGAYSQFJoRMMCXkBjMM48EmxAIA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type text) meta [Serialized.Text = true]) in type table [Person = _t, #"Period 1" = _t, #"Period 2" = _t, #"Period 3" = _t, #"Period 4" = _t, #"Period 5" = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"Person", type text}, {"Period 1", Int64.Type}, {"Period 2", Int64.Type}, {"Period 3", Int64.Type}, {"Period 4", Int64.Type}, {"Period 5", Int64.Type}}), #"Unpivoted Columns" = Table.UnpivotOtherColumns(#"Changed Type", {"Person"}, "Attribute", "Value") in #"Unpivoted Columns"then write a measure as:
Measure = DIVIDE(CALCULATE(SUM('Table'[Value]),ALLEXCEPT('Table','Table'[Attribute])),COUNTROWS('Table'))format as 'Percentage' > should return as:
analyticsnags
5 years agoRegular Visitor
I hope Power Bi by default order by X axis based on measure you use.
So any bar chart / column chart you can acieve it by default. If it is not working try to change the sort property by clicking the three dots on top of chart.