Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more.
Get startedGrow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.
Hello 2gether
I have a question regarding a formula in DAX. I want to create a measure naming "m_sum_costs".
I have a column "A" with cost-center with are digits like 699545, 745826, 406669, etc. and column "B" are values with 50.000$, 69.56$. Now i want to calculate all cost-center witch not begins with 6....
I thought a formula like this: m_sum_cost = Calculate (Sum(tab_actuals[values]), FILTER (tab_actuals, tab_actuals[cost_center] <> 6%))
This doesn't work.
As I am new with developing with DAX, I would be thankful i you could help me:)
Thanks in advance!
Solved! Go to Solution.
@Demi612 In DAX, you can use the LEFT function to extract a specified number of characters from the beginning of a string. Here's how you can modify your measure to sum up values for cost centers that do not start with '6':
m_sum_costs =
CALCULATE (
SUM ( tab_actuals[values] ),
FILTER (
tab_actuals,
LEFT ( tab_actuals[cost_center], 1 ) <> "6"
)
)
If you find this insightful, please provide a Kudo and accept this as a solution.
@Demi612 In DAX, you can use the LEFT function to extract a specified number of characters from the beginning of a string. Here's how you can modify your measure to sum up values for cost centers that do not start with '6':
m_sum_costs =
CALCULATE (
SUM ( tab_actuals[values] ),
FILTER (
tab_actuals,
LEFT ( tab_actuals[cost_center], 1 ) <> "6"
)
)
If you find this insightful, please provide a Kudo and accept this as a solution.
User | Count |
---|---|
84 | |
80 | |
72 | |
71 | |
55 |
User | Count |
---|---|
108 | |
106 | |
93 | |
84 | |
66 |