Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I could need some help with fixing an expression in a text object so that I can display a certain calculated value no matter what selections are made.
Here's the problem:
I have a text object with the following text and expression:
='Bankdaten ' & Count (Distinct( if( [SAP Tabelle]='LFBK - Lieferantenstamm (Bankverbindungen)', Änderungsbelegnr )))
Now, I would like to fix this expression, so that the calculated value is shown even if another selection is made.
At the same time, this text box is only supposed to pop up when a certain button is pressed.
Therefore I already created a variable (vBankdatenGesamt), which is set to 1 by clicking the button.
So, I came up with an expression like:
=if(vBankdatenGesamt = '1', 'Bankdaten Gesamt ' & Count ( Distinct( if( [SAP Tabelle]={'LFBK - Lieferantenstamm (Bankverbindungen)', Änderungsbelegnr))))
But I still need to fix this one.
Any help is appreciated!
Kind regards,
Daniela
For your first question you can put anything you like in set analysis:
=Count ({< [SAP Tabelle]={'LFBK - Lieferantenstamm (Bankverbindungen)'}, [CPD-Kreditoren]={'ja'}>} DISTINCT Änderungsbelegnr)
This will simply return 0 if that's the answer.
I don't really understand your second question, but I think maybe look at the functions GetPossibleValues() and GetSelectedValues()
Hope this helps,
Jason
Hallo Daniela,
another solution to only let your text box expression respond to month or year selections might be:
='Bankdaten Gesamt:'&Count({1<[SAP Tabelle]={'LFBK'},Geschäftsjahr=$::Geschäftsjahr,Monat=$::Monat>} DISTINCT Änderungsbelegnr)
vielleicht hilft's
Gruß
Marco
Thanks a lot! I got it!
I created two new variables (vCPD and vKredexCPD) and integrated them and your above expression into the text field of my text object:
=if(vCPD= '1', 'CPD-Kreditoren ' & Count ({< [SAP Tabelle]={'LFBK - Lieferantenstamm (Bankverbindungen)'}, [CPD-Kreditoren]={'ja'}>} DISTINCT Änderungsbelegnr),
if(vKredexCPD = '1', 'Kreditoren ex CPD ' & Count ({< [SAP Tabelle]={'LFBK - Lieferantenstamm (Bankverbindungen)'}, [CPD-Kreditoren]={'nein'}>} DISTINCT Änderungsbelegnr),
'Bankdaten ' & Count (Distinct( if( [SAP Tabelle]='LFBK - Lieferantenstamm (Bankverbindungen)', Änderungsbelegnr )))))
The variables are set to 1 by pressing the corresponding buttons. This way I managed to display the correct values in my text object with the corresponding titles. And using the same variables I also got my graphic to display "no data" when applicable.
So, both questions answered.
Regards,
Daniela
Thanks, Marco.
Already integrated the other solution into my qvd-file, but it seems your answer would have done the same job.
Regards,
Daniela
Hey Jason,
I could need another advice for fixing an expression.
This time I got a text box which is supposed to give me a certain text depending on which year I select.
The below screenshots display the required text to be shown for 2016 and 2013 respectively.
The text itself has some variable factors which keep changing whenever I select a value in any other field.
Currently, when I drill down to certain items of a year, the text keeps changing accordingly. This is what I need to avoid. Especially, the selection in the field "BelegNr." is not allowed to influence the numbers in my text box..
This is my expression:
=Geschäftsjahr & if(Match(Geschäftsjahr,'2013', '2016'), ': ', ' ')
& if( Geschäftsjahr = '2016', Count({1< Geschäftsjahr = {'2016'} >} Distinct BelegNr.) & if(Count({< Geschäftsjahr = {'2016'} >} Distinct BelegNr.)=1, ' Änderung', ' Änderungen')
//& if(Num ([Alter Wert BELEG]) <= Num([Neuer Wert BELEG]),
& if(Count({1< Geschäftsjahr = {'2016'} >} Distinct BelegNr.)>1, '
' & GetPossibleCount(BelegNr.), ' ') & ' von ' & Count({1< Geschäftsjahr = {'2016'} >} Distinct BelegNr.) & ' Änderungen '
& if(Count(Distinct BelegNr.)=1, 'ist', 'sind') & ' nicht ordnungsgemäß. Das Basisdatum wurde von ' & if(Count(Distinct Änderer)=1, 'User ' & Änderer, Count(Distinct Änderer)& ' Usern') & ' in die Zukunft gelegt.' ,
if(Geschäftsjahr = '2013', Count({< Geschäftsjahr = {'2013'} >} Distinct BelegNr.) & if(Count({< Geschäftsjahr = {'2013'} >} Distinct BelegNr.)=1, ' Änderung', ' Änderungen')
& if(Num ([Alter Wert BELEG]) >= Num([Neuer Wert BELEG]), '
Keine Beanstandungen.')) & ' ')
I also attached a sample of my qvd.
Hope you can help me on this one.
A second aspect I would need to solve is that currently all items are counted. However, I would need to have the condition integrated that only items are counted for which [Alter Wert] <= [Neuer Wert] is true, without having those items explicitely selected.
Right now I worked my way around, but the moment more changes are recorded, this might not work anymore.
Example: another items date is changed and this time [Alter Wert] >= [Neuer Wert]. This would be an item not to be counted - leading to the text:
"2016: 7 Änderungen
6 von 7 Änderungen sind nicht ordnungsgemäß. Das Basisdatum ...."
Thanks in advance. Regards,
Daniela
Hi,
please don't post independent questions in one thread, instead open a new one for your new question.
thanks
regards
Marco