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.
Hi there,
I have 2 facts based on 2 differents tables: SalesAmount and BudgetAmount.
I'd like to create a measure "SalesComparsion" which should consider "SalesAmount" only if the Customer (dimension joined to both facts), has a budget, this measure should work though I do not use the "customer" as detail in the analysis, for instance a monthly analysis.
How do I solve this?
Thank you
Solved! Go to Solution.
Hi @Anonymous
Try this to find the Sale Amount:
Measure =
VAR _A =
FILTER (
ADDCOLUMNS (
SALE,
"Budget", LOOKUPVALUE ( BUDGET[AMOUNT], BUDGET[Customer_COD], SALE[Customer_COD] )
),
[Budget] > 0
)
RETURN
SUMX ( _A, [AMOUNT] )
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Hi @Anonymous
Can you add a sample of your data n a table format, and result?
Appreciate your Kudos!!
Hi @VahidDM ,
some screenshots: the relations of the 3 involved, data contained and the actual results.
ThanksRelations
Data
Results
Hi @Anonymous
Try this to find the Sale Amount:
Measure =
VAR _A =
FILTER (
ADDCOLUMNS (
SALE,
"Budget", LOOKUPVALUE ( BUDGET[AMOUNT], BUDGET[Customer_COD], SALE[Customer_COD] )
),
[Budget] > 0
)
RETURN
SUMX ( _A, [AMOUNT] )
If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
Great!
It's exactly what I war looking for.
Thanks
User | Count |
---|---|
25 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
30 | |
13 | |
11 | |
9 | |
6 |