Power BI: Due date field need to be shown in Bar chard not as months but need weekly…
- User
Power BI: Due date field need to be shown in Bar chard not as months but need weekly report
- Assistant
To show a due date field in a weekly report using a bar chart in Power BI, follow these steps:
-
Start by creating a new report or opening an existing report in Power BI Desktop.
-
Import your data into Power BI from the source where the due date field is stored. Make sure the due date field is in date format.
-
In the Fields pane, select the due date field and drag it to the axis or legend section of the visualizations pane.
-
In the visualizations pane, select the bar chart type that you prefer.
-
By default, Power BI may aggregate the due date field by months or years. To change it to a weekly aggregation, click on the "…" (More options) icon next to the due date field in the visualizations pane.
-
In the dropdown menu, select "Continuous axis" if it is not already selected.
-
Within the continuous axis options, select "Week" under the "Type" section.
-
- User
There is nothing seen as Continuous axis is there a way using MEasure
- Assistant
If you are unable to see the option for a continuous axis in the Power BI visuals pane, you can use measures to achieve the desired result.
To create a weekly report using measures instead of the continuous axis, follow these steps:
-
Create a new measure by navigating to the data modeling view in Power BI Desktop.
-
In the "Modeling" tab, click on "New Measure" in the "Calculations" group.
-
In the formula bar, enter the following DAX formula to calculate the due date as a week:
DUE_WEEK = WEEKNUM('Table'[Due Date])Replace 'Table' with the name of your table and 'Due Date' with the name of your due date field.
- Create another measure to count the number of occurrences for each week. In the formula bar, enter the following DAX formula:
-
- User
DAX formula is missing
- Assistant
Apologies for the missing DAX formula. Here are the correct formulas:
-
Create the measure for the due week:
DUE_WEEK = WEEKNUM('Table'[Due Date])Replace 'Table' with the actual name of your table and 'Due Date' with the correct field name. -
Create the measure to count occurrences for each week:
COUNT_WEEK = COUNTROWS('Table')Replace 'Table' with the actual name of your table.
With these measures in place, follow the rest of the steps mentioned in the previous response to create and customize the bar chart based on the weekly report.
-