Forum Discussion
Cumulative sum less than selected month
- 1 year ago
Hello Jyaul1122,
Thank you for reaching out to the Microsoft Fabric Community Forum.I've reproduced your scenario and validated your requirement to display cumulative sales from January to the selected month while keeping the full month axis visible. I initially attempted to achieve this using your existing Calendar and Sales tables, adhering to your constraint of not creating a new table. However, despite testing various DAX measures (e.g: using ALLSELECTED and proper relationships), the slicer consistently filtered out unselected months, showing only the selected month's data or incorrect totals due to Power BI's pre-filtering behavior.
When a slicer filters the same column used in a visual’s axis (e.g: Calendar[Month]), Power BI removes unselected rows from the data context before any measure or visual filter is applied. This occurs even with ALL() or ALLSELECTED() in DAX, as the slicer’s effect precedes measure evaluation. Attempts to use a Show Month Filter = 1 measure as a visual filter also didn’t preserve the full axis.
To meet your requirement, I used a disconnected Month Selector table. This approach avoids the slicer’s default filtering behavior and ensures the full month axis remains visible and For your reference, I've attached a sample .pbix file.
I recognize your preference to avoid new tables due to your complex data model. However, the intrinsic behavior of Power BI slicers with the existing setup made it impossible to preserve the full month axis without this workaround. The disconnected table ensures the slicer selection only influences the measure logic, leaving the axis intact.
Thanks for your understanding.
Best Regards,
Ganesh Singamshetty.
Hello Jyaul1122,
Thank you for reaching out to the Microsoft Fabric Community Forum.
I've reproduced your scenario and validated your requirement to display cumulative sales from January to the selected month while keeping the full month axis visible. I initially attempted to achieve this using your existing Calendar and Sales tables, adhering to your constraint of not creating a new table. However, despite testing various DAX measures (e.g: using ALLSELECTED and proper relationships), the slicer consistently filtered out unselected months, showing only the selected month's data or incorrect totals due to Power BI's pre-filtering behavior.
When a slicer filters the same column used in a visual’s axis (e.g: Calendar[Month]), Power BI removes unselected rows from the data context before any measure or visual filter is applied. This occurs even with ALL() or ALLSELECTED() in DAX, as the slicer’s effect precedes measure evaluation. Attempts to use a Show Month Filter = 1 measure as a visual filter also didn’t preserve the full axis.
To meet your requirement, I used a disconnected Month Selector table. This approach avoids the slicer’s default filtering behavior and ensures the full month axis remains visible and For your reference, I've attached a sample .pbix file.
I recognize your preference to avoid new tables due to your complex data model. However, the intrinsic behavior of Power BI slicers with the existing setup made it impossible to preserve the full month axis without this workaround. The disconnected table ensures the slicer selection only influences the measure logic, leaving the axis intact.
Thanks for your understanding.
Best Regards,
Ganesh Singamshetty.