Get certified for free when you join Fabric Data Days 2026 and dive into Fabric, Power BI, SQL, AI, and other essential data skills.
Join nowData Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more
ISSUE:
The following code:
CALCULATE(
DIVIDE(
CALCULATE(
SUMX('IVDS Summary', [Count]),
ALLSELECTED('DimDate'[Date]),
ALL(DimDate[Year]),
ALL(DimDate[MonthNameShort]),
ALL(DimDate[Day]),
ALL(DimDate[DayOfWeekShort])
),
COUNT('DimDate'[Date]),
0
),
ALLSELECTED('DimDate'[Date]),
ALL(DimDate[Year]),
ALL(DimDate[MonthNameShort]),
ALL(DimDate[Day]),
ALL(DimDate[DayOfWeekShort])
)
with a DimDate[Date] slicer filtering the 'IVDS Summary' table on its [Date] column, plus DimDate[Year], DimDate[MonthNameShort], DimDate[Day], DimDate[DayOfWeekShort] in the X-axis data wells of the Line and Clustered Column visual produces this erroneous reset in the calculation every single time a new month starts. It's as if the CALCULATE is computed only on 30 or 31 days (depending on the month) even though the date slicers are set to 12 months:
In other words, the code above is supposed to produce a horizontal line for the whole selected period regardless of the dates on the x-axis. In this particular instance, an average over the whole period (or n days), while the columns represent the different sums for each day. So no rocket science here. 😋
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.