Check your eligibility for this 50% exam voucher offer and join us for free live learning sessions to get prepared for Exam DP-700.
Get StartedDon't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.
How would I write the following formulas in DAX:
If you see in the last two columns, I have written the formulas and the Last column is how the Excel formula looks like, which is, Cost(a)/Sum of Cost for week 1, and so on and so forth for each product. Essentially we want to be able to find Cost Percentage per week per product. I'm not able to grasp the exact formula for this in DAX.
Thanks for the help!:)
hi @Anonymous_
try to add a column like this:
Cost%2 =
DIVIDE(
[Cost],
SUMX(
FILTER(
TableName,
TableName[Week]=EARLIER(TableName[Week])
),
TableName[Cost]
)
)
if you feel more comfortable with CALCULATE, it looks like this:
Cost%3 =
DIVIDE(
[Cost],
CALCULATE(
SUM(TableName[Cost]),
ALLEXCEPT(TableName, TableName[Week])
)
)
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.
Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.
User | Count |
---|---|
21 | |
15 | |
14 | |
11 | |
9 |
User | Count |
---|---|
26 | |
23 | |
12 | |
11 | |
10 |