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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Im trying to sumarise data with dax query to create a new table based on date ranges. This an example and what it should look like for example range between 17/12/2021 to 10/01/22
Date
| Type | Date | No |
| A | 12/12/2021 | 15 |
| A | 17/12/2021 | 2 |
| A | 21/12/2021 | 5 |
| C | 8/12/2021 | 3 |
| D | 4/01/2022 | 2 |
| Result | ||
| Type | Date | Total |
| A | 17/12/2021 | 7 |
| D | 4/01/2022 | 2 |
Thanks for getting back that is what I got, but I want it to totaled it for A (2+5)
@Anonymous
Try this code:
New Table =
VAR _Start =
DATE ( 2021, 12, 17 )
VAR _End =
DATE ( 2022, 01, 10 )
RETURN
SUMMARIZE (
FILTER ( 'Table', 'Table'[Date] >= _Start && 'Table'[Date] <= _End ),
'Table'[Type],
"Date", MIN ( 'Table'[Date] ),
"Total", SUM ( 'Table'[No] )
)
Output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Hi @Anonymous
How did you calculate 7 for line 17/12/2021?
BTW, if you want to filter the table with a date range, use this code to add new table with dax:
output:
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
| User | Count |
|---|---|
| 9 | |
| 7 | |
| 6 | |
| 6 | |
| 5 |
| User | Count |
|---|---|
| 24 | |
| 21 | |
| 18 | |
| 14 | |
| 14 |