Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dears,
I am currently trying to calculate the absolute difference between imports and exports at SKU level in the total. For the same SKU, I have imports and exports in every week. At the end of week 8, I'd like to check the absolute difference between Imports and Exports. How?
Solved! Go to Solution.
@Omega,
Create the following measures and check if you get expected result.
NewMeasure = IF(COUNTROWS(VALUES(Table2[SKU]))=1,Table2[ABSDIFF],SUMX(VALUES(Table2[SKU]),[ABSDIFF]))
Measure 3 = [NewMeasure]/[ExportTotal]
Regards,
Lydia
what is your actual requriement here?
you want to divide it into some of the skus but not all?
can you tell me what your end goal is, ie the business requirement
Proud to be a Super User!
Requirement: Calculate Abs(Export - Import)/Export at SKU level, week level and month level assuming month level have been already defined based on the weeks.
We have many SKUs and it's impossible to filter them. We need a general measure that does the calculation regardless of the numbers of SKUs.
Thanks!
alright i am just trying to understand the problem
do you want all the sku's or just certain sku's, so what i am saying how will power bi know what sku's to use? is there an indicator that is applied to them. the ones you need to use. what is the condition that will include them in the calculation
Proud to be a Super User!
It should be all SKUs.
Imagine in excel::
You have a list of SKUs that have exports and imports in different weeks (Same as the one I shared in my first post but with multiple SKUs). You will create a column that will get you the absolute difference for each SKU which is the measure we have created earlier. At the end, you will sum up the exports and the absolute diffenence for all SKUs and then you will will divide the summation of absolute difference to the total exports to get a percantage. This percentage will be at SKU level.
So in my example, 470/8510 = 5% for that SKU.
I hope I'm clear.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
107 | |
93 | |
77 | |
65 | |
53 |
User | Count |
---|---|
147 | |
106 | |
104 | |
87 | |
61 |