Diese Seite mit anderen teilen ...

Informationen zum Thema:
Forum:
WinDev Forum
Beiträge im Thema:
7
Erster Beitrag:
vor 1 Monat, 3 Wochen
Letzter Beitrag:
vor 1 Monat, 2 Wochen
Beteiligte Autoren:
SolutionJ-Reg, Ned!, Allard

Pivot Table Calculated Value

Startbeitrag von SolutionJ-Reg am 19.10.2017 21:37

WD22

Hi,

I have a pivot table showing as row values Revenue, Costs, Margin £. I also want to show Margin % based on the calculation Margin % = Margin £ / Revenue.

I have set the Margin % cell to have a local procedure as its source, passing in the Revenue and Margin £ values and giving a result of Margin %, but the results are not always correct.

Has anyone else ever tried anything like this?

Thanks
Reg

Antworten:

Hi Reg,

I've used the Pivot table quite a bit, but never had much luck using the procedures.

I went down the route of using a calculated field in a query and using the query as a data source - its more reliable for me that way.

Thanks,
Ned

von Ned! - am 20.10.2017 14:32
Hi Ned,

Thanks for the response. I can't use your method in this case because the %,, being a percentage, needs to be calculated in real time as it were based on which row values are expanded or not in the pivot table.

Rgds
Reg

von SolutionJ-Reg - am 20.10.2017 17:05
Hi Reg,


When using a datasource this is exactly what happends. ( ned his option ) The pivot table adds the values of 3 months to the value of a quarter etc.


I have a planning versus control pivot table and this calculates sales etc and compares it with the prognose and displays differences .


regards

Allard

von Allard - am 20.10.2017 19:10
Hi,

Unfortunately that won't work when calculating percentages Allard, but thanks...

von SolutionJ-Reg - am 20.10.2017 19:50
Hi Reg,

Could you code the percentage calculation using the pvtPosition variable and the Display Cell event?

Thanks
Ned

von Ned! - am 23.10.2017 10:59
Hi Ned,

That looks very interesting, I'll give it a go.

Thanks :-)

von SolutionJ-Reg - am 23.10.2017 11:07
Zur Information:
MySnip.de hat keinen Einfluss auf die Inhalte der Beiträge. Bitte kontaktieren Sie den Administrator des Forums bei Problemen oder Löschforderungen über die Kontaktseite.
Falls die Kontaktaufnahme mit dem Administrator des Forums fehlschlägt, kontaktieren Sie uns bitte über die in unserem Impressum angegebenen Daten.