Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hello,
I have this table with units and units of the previous period. To be able to filter with this slicer i added to the SPLY metric an ALL() function, because if i do not, the metric doesn't show values when i filter by one specific month as in the screencapture.
My problem now is that i need to show in the table only the values of the month-year filtered in the slicer and the total of only this specific period. Is there any dax function to combine with ALL() in order to display only the selected datetime.
The way i calculate Same period last year column is:
Thank you!
Hello @Anonymous ,
Ideally, the slicers will slice visuals and show only relevant dates. It is not clear from your example if you have created a calendar table in your data model. For time intelligence function to work properly, it is recommended to have a calendar table in the data model.
I have recreated a sample scenario, and used following measures:
Total Orders (SPLY) =
CALCULATE(
[Total Orders],
SAMEPERIODLASTYEAR(ftCalendar[Date])
)
Total Orders A(SPLY) =
CALCULATE(
[Total Orders],
ALL(ftCalendar[Date]),
SAMEPERIODLASTYEAR(ftCalendar[Date])
)
Following is the result:
As you can see, both the formula is giving me the desired results and the visual is filtering accordingly.
In this, I have created a calendar table and used it in the model.
You may refer to the article for adding a calendar table:
https://www.vivran.in/post/power-bi-time-intelligence-calendar-table
Cheers!
Vivek
If it helps, please mark it as a solution. Kudos would be a cherry on the top 🙂
If it doesn't, then please share a sample data along with the expected results (preferably an excel file and not an image)
Feel free to email me for any BI needs.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 8 | |
| 6 | |
| 6 | |
| 5 | |
| 4 |
| User | Count |
|---|---|
| 25 | |
| 15 | |
| 8 | |
| 8 | |
| 8 |