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
Anonymous
Not applicable

How to multiply with filters

Hello, 

I have problems with the DAX formula for multiplying numbers from my fact table with filters. 

ngut47_0-1647207061073.png

 

I would like to multiply the category A with B, but also only multiply each subcategory with the same subcategory from the different category. 

Example

(A - first) 2,5 × (B - first) 187 =

(A - second) 3 × (B - second) 99 =

 

I want to leave out C completely. 

 

I have three tables. 1 fact table with the Amount, 2nd is the dimension table Category and the last one is dimension table Subcategory.

 

How to go around this problem with a DAX formula? Is it even possible? 

 

Thank you so much 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

In the end I just created two variables with filters and multiplied them 

 

 Measure =

var acat = CALCULATE(SUM('Table'[Amount]),Category[Category]="a")

var bcat = CALCULATE(SUM('Table'[Amount]),Category[Category]="b")

return acat*bcat 

 

Not ideal but it does the work. 

 

 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

In the end I just created two variables with filters and multiplied them 

 

 Measure =

var acat = CALCULATE(SUM('Table'[Amount]),Category[Category]="a")

var bcat = CALCULATE(SUM('Table'[Amount]),Category[Category]="b")

return acat*bcat 

 

Not ideal but it does the work. 

 

 

Anonymous
Not applicable

Its showing me error because of the two brackets after Fact[Amount]. The numbers dont match. After i tried the measure, it shows completely different numbers. I want to display the subcategory with the calculated amount. 

16472666433717234555689422989884.jpg

 I want to put this measure into a new table and there will be two columns with the subcategories and the calculated column 

First | 467.5

Second | 297

Third | 682.5

Something like this

amitchandak
Super User
Super User

@Anonymous , Try a measure like

 

calculate(ProductX(values(Subcategory[Subcategory]), calculate(Sum(Fact[Amount])), filter(Category,Category[Category] <>"C")) )

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

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

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

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.