Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
Good night people Doubt. Today to make% calculation based on two measures is quiet. Example. Comparing this month with previous month, is quiet. But let's suppose, I'm comparing revenue. When I have in the table, the Profit field, I wanted to make an IF in this%. Example. If the X field equals Profit, divide the costs by the revenue, otherwise, do the normal. I even put something together in the following sense. % Calculation = Var calculus1 = DIVIDE ([Total Value Previous Month], [Actual Total Value], 0) var calculo2 = DIVIDE (calculation1; [03 Net Revenue]; 0) VAR account = SELECTEDVALUE ('DRE Format') = 5 return IF (account; calculo2; calculo1) It returns Zero anyway. Best Regards
Solved! Go to Solution.
Hi Phil
For example.
I want to do:
[Total Value Previous Month] = Mês Anterior
It's return 726.182 (Lucro Bruto).
Now, the measure is (DIVIDE ([Total Value Previous Month], [Actual Total Value], 0), it's ok.
But, is it possible this scenary?
If the field = Lucro Bruto, so divide (the actual total value about lucro bruto ; the actual total value about Receita Liquida)?
% Calculation =
Var calculus1 = DIVIDE ([Total Value Previous Month], [Actual Total Value], 0)
var calculo2 = DIVIDE (calculation1; [03 Net Revenue]; 0)
VAR account = SELECTEDVALUE ('DRE Format') = 5 return IF (account; calculo2; calculo1)
Hi Phil
For example.
I want to do:
[Total Value Previous Month] = Mês Anterior
It's return 726.182 (Lucro Bruto).
Now, the measure is (DIVIDE ([Total Value Previous Month], [Actual Total Value], 0), it's ok.
But, is it possible this scenary?
If the field = Lucro Bruto, so divide (the actual total value about lucro bruto ; the actual total value about Receita Liquida)?
% Calculation =
Var calculus1 = DIVIDE ([Total Value Previous Month], [Actual Total Value], 0)
var calculo2 = DIVIDE (calculation1; [03 Net Revenue]; 0)
VAR account = SELECTEDVALUE ('DRE Format') = 5 return IF (account; calculo2; calculo1)
Check out the September 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
105 | |
99 | |
99 | |
38 | |
37 |
User | Count |
---|---|
156 | |
121 | |
73 | |
73 | |
63 |