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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.