Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have a summarized table but I want to filter to the current year. How to I amend the code below to make that happen?
Order Profile =
SUMMARIZE (
'Sales Table',
'Sales Table'[Order_Num_Key],
Customer[Sector],
"Total Value", SUM ( 'Sales Table'[Net Invoice Value] ),
"Order Count", DISTINCTCOUNT('Sales Table'[Order_Num_Key])
)Thanks 🙂
Solved! Go to Solution.
Hi @davehus,
Try something like below please. "DimDate" is a date table.
Order Profile =
CALCULATETABLE (
SUMMARIZE (
'Sales Table',
'Sales Table'[Order_Num_Key],
Customer[Sector],
"Total Value", SUM ( 'Sales Table'[Net Invoice Value] ),
"Order Count", DISTINCTCOUNT ( 'Sales Table'[Order_Num_Key] )
),
YEAR ( DimDate[Datekey] ) = YEAR ( TODAY () )
)
Best Regards,
Dale
Hi All,
What if I want to filter the summarized table using one of the aggregated columns?
@Anonymous can you provide an example of what you saying?
Proud to be a Super User!
Hi @davehus,
Try something like below please. "DimDate" is a date table.
Order Profile =
CALCULATETABLE (
SUMMARIZE (
'Sales Table',
'Sales Table'[Order_Num_Key],
Customer[Sector],
"Total Value", SUM ( 'Sales Table'[Net Invoice Value] ),
"Order Count", DISTINCTCOUNT ( 'Sales Table'[Order_Num_Key] )
),
YEAR ( DimDate[Datekey] ) = YEAR ( TODAY () )
)
Best Regards,
Dale
Pleae can you explain the solution ? why we can't use dimate filter within the SUMMARIZE funciton.
@davehus don't know if this helps
https://blogs.msdn.microsoft.com/karang/2013/02/15/dax-using-filter-and-summarize-in-same-query/
Proud to be a Super User!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 43 | |
| 42 | |
| 23 | |
| 17 |
| User | Count |
|---|---|
| 190 | |
| 122 | |
| 96 | |
| 66 | |
| 47 |