Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi,
I needed to create a measure/column that can take a field in opportunity object from SalesForce and multiply based on a filter slicer. For example, I need to multiply opportunity services amount by Booked% below based on the filter if I select commodities and 2/5/2021. Is it possible?
Thank you so much in advance.
Solved! Go to Solution.
Hi, @powerbiwork
The filters works on the table visual, so there is no need to create an additional virtual table "myFilteredTable" in your measure "Division Factor".
It is recommended to calculate in two steps.
Step1: calculate the factor as below first.
Factor =
SWITCH (
SELECTEDVALUE ( Opportunity[Commit_Upside__c] ),
"Booked", SUM ( '2021 Assumptions'[Booked%] ),
"Commit", SUM ( '2021 Assumptions'[Commit%] ),
"Upside", SUM ( '2021 Assumptions'[Upside%] ),
"Potential", SUM ( '2021 Assumptions'[Potebtial%] ),
"Pipeline", SUM ( '2021 Assumptions'[Pipeline%] )
)
Step 2: Column "Opportunity'[Positive_Services_Amount__c USD])" multiplied by factor “Factor”
Value = SUM(Opportunity[ToUSD-Positive_Services_Amount])* [Division Factor]
Please check my sample file for more details.
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @powerbiwork
The filters works on the table visual, so there is no need to create an additional virtual table "myFilteredTable" in your measure "Division Factor".
It is recommended to calculate in two steps.
Step1: calculate the factor as below first.
Factor =
SWITCH (
SELECTEDVALUE ( Opportunity[Commit_Upside__c] ),
"Booked", SUM ( '2021 Assumptions'[Booked%] ),
"Commit", SUM ( '2021 Assumptions'[Commit%] ),
"Upside", SUM ( '2021 Assumptions'[Upside%] ),
"Potential", SUM ( '2021 Assumptions'[Potebtial%] ),
"Pipeline", SUM ( '2021 Assumptions'[Pipeline%] )
)
Step 2: Column "Opportunity'[Positive_Services_Amount__c USD])" multiplied by factor “Factor”
Value = SUM(Opportunity[ToUSD-Positive_Services_Amount])* [Division Factor]
Please check my sample file for more details.
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hey @powerbiwork ,
you should do that with a measure. A calculated column is always static, so you can't change that dynamically.
Try the following measure and replace your columns accordingly:
Division Factor =
VAR SelectedDivision = SELECTEDVALUE( DimDivision[Division] )
VAR SelectedDate = SELECTEDVALUE( DimDate[Date] )
VAR myFilteredTable =
CALCULATETABLE(
MyFactTable,
DimDate[Date] = SelectedDate,
DimDivision[Division] = SelectedDivision
)
RETURN
SUMX( myFilteredTable, MyFactTable[Booked%] * [Opportunity Services])
I was assuming Opportunity Services is a measure.
If you need any help please let me know.
If I answered your question I would be happy if you could give it a thumbs up 👍!
Best regards
Denis
Hi @selimovd
Thank you so much for your solution it really helps. However, I did run into other issues and I should have been more clear in the beginning. So the goal of the filtered table was so that I could use this formula:
Hey @powerbiwork ,
I try to understand where the data is coming from.
What is the table Opportunity and where is the column Commit_Upside__c? Is this another table? Is this in the same table? How would it look if you filter by division?
Best regards
Denis
Hi @selimovd
So I have two tables below one from salesforce - opportunity and one from excel
I wanted to create a dynamic measure base on a slicer which will be from the excel table and multiply the value to the opportunity table
so for example, if the slicer is set to commodities at 2/5/2021 then I want the equation for 2021 assumption to multiply the filtered values :
So I modified your solution to
Is it possible?
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
88 | |
86 | |
83 | |
64 | |
49 |
User | Count |
---|---|
127 | |
108 | |
88 | |
70 | |
66 |