Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Alex1871
Frequent Visitor

Sum over distinct values Filtered by date

I have a table that follows the idea of something like this:

 

DateProductCategoryBudget
JuneProd 1Shoe30000
JuneProd 2Shoe30000
JuneProd 3Jacket20000
JuneProd 4Short10000
MayProd 1Shoe40000
MayProd 2Shoe40000
MayProd 3Jacket20000
MayProd 4Short10000

 

As you can see, every product is assigned to a category, and every categroy has a budget. For example, 40000 is the budget for the entire shoe category. This budget will change monthly. I simply want to calculate the entire budget as a number, to use it for further calculations, and this should be filtered by month.

 

Now I cant just sum over the budget monthly, because there are multiple shoe products. I tried the following command which returns a table and the correct value, if I chose to represent it as a column chart, the date filter is applied through another slicer field: 

 

total_budget= SUMX(
    SUMMARIZE( TableA, TableA[Category], "A", MAX(TableA[Budget])),
    [A]
)

 

I would appreciate any help or ideas, not necessarily building upon my total_budget formula.

1 REPLY 1
FreemanZ
Super User
Super User

hi @Alex1871 

why Shoe have two budgets in May? 30000 and 40000?

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.