Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi,
I have many columns in an SQL DB table and these 2 among them: [Property] and [Value]. [Property] has ~30 different items.
How can I divide only 2 specific properties? I'm not quite sure how an SQL WHERE clause could be translated into DAX. I've tried this measure without success:
InflationPerCostBase = CALCULATE(
DIVIDE(
SUM('Report1 (2)'[Value]);
SUM('Report1 (2)'[Value])
);
FILTER(
'Report1 (2)';
'Report1 (2)'[Property] = "AOP Inflation" &&
'Report1 (2)'[Property] = "AOP Cost Base"
)
)
What is the best practice here?
Thanks,
Tamás
Solved! Go to Solution.
Hi Tamás,
We can evaluate the totals separately. Try this formula please.
InflationPerCostBase =
VAR AOPInflation =
CALCULATE (
SUM ( 'Report1 (2)'[Value] );
'Report1 (2)'[Property] = "AOP Inflation"
)
VAR AOPCostBase =
CALCULATE (
SUM ( 'Report1 (2)'[Value] );
'Report1 (2)'[Property] = "AOP Cost Base"
)
RETURN
DIVIDE ( Inflation; CostBase; 0 )Best Regards!
Dale
Hi Tamás,
We can evaluate the totals separately. Try this formula please.
InflationPerCostBase =
VAR AOPInflation =
CALCULATE (
SUM ( 'Report1 (2)'[Value] );
'Report1 (2)'[Property] = "AOP Inflation"
)
VAR AOPCostBase =
CALCULATE (
SUM ( 'Report1 (2)'[Value] );
'Report1 (2)'[Property] = "AOP Cost Base"
)
RETURN
DIVIDE ( Inflation; CostBase; 0 )Best Regards!
Dale
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.