Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello,
I have problems with the DAX formula for multiplying numbers from my fact table with filters.
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
Solved! Go to Solution.
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.
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.
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.
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
@Anonymous , Try a measure like
calculate(ProductX(values(Subcategory[Subcategory]), calculate(Sum(Fact[Amount])), filter(Category,Category[Category] <>"C")) )
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
13 | |
11 | |
9 | |
6 |