Two Modules: X-Axis Power BI Column Chart Setup
In this article, we will discuss how to set up a column chart in Power BI with two modules on the X-axis. The first module will be struck through, and the second module will display the date. This setup will provide a clear and concise view of your data, making it easy to understand and analyze.
Setting up the Column Chart
To set up the column chart, follow these steps:
- Open Power BI and create a new report.
- Add a column chart to the report.
- Add the first module to the X-axis of the chart and apply the strikethrough format.
- Add the second module to the X-axis of the chart and set it to display the date.
Module 1: Strikethrough Format
To apply the strikethrough format to the first module, follow these steps:
- Select the first module in the X-axis.
- Go to the "Format" tab in the "Visualizations" pane.
- Under "Axis", select "Format".
- Check the "Strikethrough" box.
Module 2: Displaying the Date
To display the date in the second module, follow these steps:
- Select the second module in the X-axis.
- Go to the "Fields" pane.
- Drag the date field to the "Values" area.
- Go to the "Format" tab in the "Visualizations" pane.
- Under "Values", select "Format".
- Check the "Date" box and select the desired date format.
Setting up a column chart in Power BI with two modules on the X-axis is a simple and effective way to display your data. By striking through the first module and displaying the date in the second module, you can create a clear and concise view of your data that is easy to understand and analyze.
References
- Microsoft Power BI: Multi-axis charts
- Power BI Community: Strikethrough text in axis labels
- Microsoft Power BI: Conditional formatting
// Example code for setting up the column chart
let
Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WMlTSUzI1V...", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [Column1 = _t, Column2 = _t]),
#"Changed Type" = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type date}}),
#"Added Index" = Table.AddIndexColumn(#"Changed Type", "Index", 0, 1, Int64.Type)
in
#"Added Index"
The above code is an example of how to set up the column chart in Power BI using the M formula language. The code creates a table with two columns, one for the first module and one for the second module. The second module is set to display the date. The code also adds an index column to the table, which can be useful for sorting and filtering the data.
Note: The above code is just an example, and you will need to modify it to fit your specific data and requirements.
Please ensure that the output HTML is valid and free of any page layout tags like
, among others. Also, avoid mentioning multipage articles as the generation purpose is to split multiple pages.