Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Fixing text in text box

Hi everyone,

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

Labels (1)
0 Replies