Forum Discussion
How can I divide a column by a fixed value
- 8 years ago
Maybe you can change the table
Medida = Calculate([MOV YTD];ALL(dEBITDA);Filter(dEBITDA;dEBITDA[CONTA_EBITDA]="RECEITA LIQUIDA");dRazao)
The number has changed but it is wrong.
After several attempts, I succeeded
%Vert RLiq =
VAR DEN_01 = CALCULATE([RL YTD];ALLSELECTED(dRazao); FILTERS(dColigada[Empresa_Simples]))
VAR NUM_01 = [MOV YTD]
RETURN
DIVIDE(NUM_01;DEN_01;0)
Hello there are two things you could try next:
Firstly, add ALL(dColigada) to your CALCULATE. I assume this is your second level row.
If this doesn't work you can try and build the Measures in two steps.
Step1:=Calculate([MOV YTD];Filter(...))
Step2:=Calculate([Step1];ALL(...);All(...))
Additionally you could highlight in your image which row is related to which row in your dRazzo.
And please show us the columns you selected for your Pivot.
Best regards
Firstly, add ALL(dColigada) to your CALCULATE. I assume this is your second level row.
My second level row is dRazao. I tried with dRazao and with dColigada, but failed both. It Shows always the same result.
Medida = Calculate([MOV YTD];all(dRazao);all(dEBITDA);all(dCalendario);Filter(dEBITDA;dEBITDA[CONTA_EBITDA]="RECEITA LIQUIDA"))
or
Medida = Calculate([MOV YTD];all(dEBITDA);all(dCalendario);Filter(dEBITDA;dEBITDA[CONTA_EBITDA]="RECEITA LIQUIDA"))
Additionally you could highlight in your image which row is related to which row in your dRazzo.
Follow the visualization Pane image.
dRazao.Classeconta2 is related with dEbitda.Classeconta2 to show CONTA_EBITDA.
If this doesn't work you can try and build the Measures in two steps.
Step1:=Calculate([MOV YTD];Filter(...))
Step2:=Calculate([Step1];ALL(...);All(...))
Medida =
VAR STEP1 = Calculate([MOV YTD];Filter(dEBITDA;dEBITDA[CONTA_EBITDA]="RECEITA LIQUIDA"))
RETURN CALCULATE(STEP1;ALL(dEBITDA);ALL(dRazao))
The same result.
- Floriankx8 years agoSolution Sage
It's tricky.
I see you have a separate table for your measures. Maybe this causes the problem.
Next try:
Medida = Calculate([MOV YTD];ALL(dEBITDA);Filter(dEBITDA;dEBITDA[CONTA_EBITDA]="RECEITA LIQUIDA");dEBITDA)
You can add a table as Filter in Calculate so the measure is calculated as it would be if you had calculated it in this table.
(I don't know if this is correct in grammar, but I hope it's understandable)
- wmoura128 years agoRegular Visitor
It's tricky.
I see you have a separate table for your measures. Maybe this causes the problem.
Yes..5 days trying and failing! I did it according the good practices to organize it better, but if it is a issue i can join it all in dRazao.
Next try:
Medida = Calculate([MOV YTD];ALL(dEBITDA);Filter(dEBITDA;dEBITDA[CONTA_EBITDA]="RECEITA LIQUIDA");dEBITDA)
Same Result.
You can add a table as Filter in Calculate so the measure is calculated as it would be if you had calculated it in this table.
I did not understand
tks
Wallace
- Floriankx8 years agoSolution Sage
I understand why you are on it for such a long time.
Maybe you can change the table
Medida = Calculate([MOV YTD];ALL(dEBITDA);Filter(dEBITDA;dEBITDA[CONTA_EBITDA]="RECEITA LIQUIDA");dRazao)