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.
@dax @Anonymous @BIHelp Need help i have the following table with parent and child products and would like to derive the risk measures ($amount) in % . as shown in the example . need to create a measure for Column I E.g. Child product "AA" is a sub product of parent "A" , hence the risk numbers should be a % of the parent total sum which in this case is $10,000.00 for 31st Aug , %risk for row 4 should be H3/SUM(G2:G3) , same for row 2,3 , & 5 . Similarly for Product B category . Appreciate your help in advance
i tried using Calculate(SUM(Total),ALLEXCEPT(Product,Date,ParentProduct)) & assigning the value using SWITH statement but no luck
If this is to be a calculated column, then...
[% Risk] = // calculated column
var __parent = T[Parent Product]
var __child = T[Child]
var __date = T[Date]
var __childTotal = T[Total]
var __parentTotal =
sumx(
filter(
T,
T[Parent Product] = __parent
&&
T[Date] = __date
&&
T[Child] = __child
),
T[Total]
)
var __risk =
// If you want to see this number as
// a percentage, you should use the
// formatting feature of PBI and not
// fiddle with this number directly.
divide(
__childTotal,
__parentTotal
)
return
__risk
Is this a calculated column or a measure you want?
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 |
---|---|
43 | |
20 | |
18 | |
16 | |
15 |
User | Count |
---|---|
49 | |
26 | |
22 | |
17 | |
16 |