mozartiano
New Member
- Joined
- Sep 18, 2014
- Messages
- 18
Hello guys,
I am facing a situation with Power View that is driving me nuts
The goal is to use a Revenue's table (Faturamento) that has a field named Valor NF (Invoice's Revenue) and calculate what percentage of the total revenue (sum of all VALOR NF for all rows in the table) that single Invoice represents.
Looks simple and I built this simple formula and added it to a calculated column:
=[Valor NF]/sumx(Faturamento;Faturamento[Valor NF])
However, when I insert that column in power view and select filters (only year 2014 for instance), the value is not being recalculated accordingly. So, in a Pivot Table with Customers on the line, the TOTAL starts with 100%, but when I remove year 2014 using a filter in the side bar, the value changes to 40%, and that is not what I want to see. I would like the value to keep 100% and the percentage for each customer to change to a respective value.
In other words, I'd like the sumx function to dynamically recalculate according to the filters, like a PARTITION BY analytic function in SQL.
Can somebody help?
Below is a list of significant columns of the FATURAMENTO table.
Year - The year of the invoyce;
Month - The month of the invoyce;
Valor NF - The revenue value for that invoice;
Customer - The customer that paid the invoyce;
I am facing a situation with Power View that is driving me nuts
The goal is to use a Revenue's table (Faturamento) that has a field named Valor NF (Invoice's Revenue) and calculate what percentage of the total revenue (sum of all VALOR NF for all rows in the table) that single Invoice represents.
Looks simple and I built this simple formula and added it to a calculated column:
=[Valor NF]/sumx(Faturamento;Faturamento[Valor NF])
However, when I insert that column in power view and select filters (only year 2014 for instance), the value is not being recalculated accordingly. So, in a Pivot Table with Customers on the line, the TOTAL starts with 100%, but when I remove year 2014 using a filter in the side bar, the value changes to 40%, and that is not what I want to see. I would like the value to keep 100% and the percentage for each customer to change to a respective value.
In other words, I'd like the sumx function to dynamically recalculate according to the filters, like a PARTITION BY analytic function in SQL.
Can somebody help?
Below is a list of significant columns of the FATURAMENTO table.
Year - The year of the invoyce;
Month - The month of the invoyce;
Valor NF - The revenue value for that invoice;
Customer - The customer that paid the invoyce;