Forum Discussion
Cumulative Milestone Bar Chart does not display every week (if the Values are 0)
- 2 years ago
Hi, FSP1303
Your current DAX formula is filtering for dates up to the maximum date found in your calender-sample table for the selected fiscal year. If no milestones are set or reached for a week, that week will not show any bars, and if the labels are set to auto, it might not display the week number either.
Make sure your calender-sample table has a row for every week, even those without milestones. then modify your DAX to the following
NP_Milestones = CALCULATE( IF( ISBLANK(COUNT(Tasks[NP_Milestone])), 0, COUNT(Tasks[NP_Milestone]) ), FILTER( ALL(Calendar_Simple), Calendar_Simple[FiscalYear] = SELECTEDVALUE(Calendar_Simple[FiscalYear]) && Calendar_Simple[Date] <= MAX(Calendar_Simple[Date]) ) )Also, you might want to adjust your viz to show values that are 0.
refer: Solved: bar chart suggestion to show zero values - Microsoft Fabric Community
Show items with no data in Power BI - Power BI | Microsoft Learn
Hi, FSP1303
Your current DAX formula is filtering for dates up to the maximum date found in your calender-sample table for the selected fiscal year. If no milestones are set or reached for a week, that week will not show any bars, and if the labels are set to auto, it might not display the week number either.
Make sure your calender-sample table has a row for every week, even those without milestones. then modify your DAX to the following
NP_Milestones =
CALCULATE(
IF(
ISBLANK(COUNT(Tasks[NP_Milestone])),
0,
COUNT(Tasks[NP_Milestone])
),
FILTER(
ALL(Calendar_Simple),
Calendar_Simple[FiscalYear] = SELECTEDVALUE(Calendar_Simple[FiscalYear])
&& Calendar_Simple[Date] <= MAX(Calendar_Simple[Date])
)
)
Also, you might want to adjust your viz to show values that are 0.
refer: Solved: bar chart suggestion to show zero values - Microsoft Fabric Community
Show items with no data in Power BI - Power BI | Microsoft Learn
Thanks that solved the issue! 🙂