Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
phil-ebm
Creator
Creator

Value of Set Analysis when no data available

Hi @All


During the development of QV-Application I was confused about the SetAnalysis.

Is it possible when the Value in Set Analysis not available in the Datamodel Qlikview ignors this part of the SetAnalysis?

I have a SetAnalysis for the actual Year and the previous Year in a Variable.

vActYear = max(Jahr) = 2017

vPrevYear = vActYear - 1 = 2016 <- 2016 is not available in the datamodel because the data just start in financelYear 2017 and we need time to add the previous years

vSetAnalysisActYear: Geschäftsjahr={$(vActYear)},Monat=,[Geschäftsjahr Bez]=,Jahr=

vSetAnalysisPrevYear: Geschäftsjahr={$(vPrevYear)},Monat=,[Geschäftsjahr Bez]=,Jahr=

and use them in this expressions:

HU Count Actual Year

Count({<$(=vSetAnalysisWareExtern),$(=vSetAnalysisActYear)>}distinct [Extern HU])

HU Count Prev Year

Count({<$(=vSetAnalysisWareExtern),$(=SetAnalysisPrevYear)>}distinct [Extern HU])

The first expression for actual year works fine.

For the second one qlikview shows me the Number of all HUs and not 0 how i excpeted depending on the year.

Can someone help me where i have the error?

The first SetAnalysis-Variable "vSetAnalysisWareExtern" hast no influnece on this topic. I tried it with and without this variable and have the same result.

Regards

Philipp

1 Solution

Accepted Solutions
settu_periasamy
Master III
Master III

is this typo? missed character 'v'..

Count({<$(=vSetAnalysisWareExtern),$(=vSetAnalysisPrevYear)>}distinct [Extern HU])


View solution in original post

6 Replies
sunny_talwar

In a text box object when you add this -> $(vPrevYear), do you see 2016?

phil-ebm
Creator
Creator
Author

Yes. In a textbox I see the correct Year.

sunny_talwar

Not sure I will be able to tell much without look at a sample. Would you be able to provide one?

settu_periasamy
Master III
Master III

is this typo? missed character 'v'..

Count({<$(=vSetAnalysisWareExtern),$(=vSetAnalysisPrevYear)>}distinct [Extern HU])


jagan
Luminary Alumni
Luminary Alumni

Hi,

Did you tried this

Count({<$(=vSetAnalysisWareExtern),Geschäftsjahr={$(vPrevYear)},Monat=,[Geschäftsjahr Bez]=,Jahr=>}distinct [Extern HU])


Count({<Geschäftsjahr={$(vPrevYear)},Monat=,[Geschäftsjahr Bez]=,Jahr=>}distinct [Extern HU])


Is this working?


Regards,

Jagan.




phil-ebm
Creator
Creator
Author

Oh i'm ashemd

My colleges and I searched the hole day yesterday and didn't see this small doubt

No everything works fine.

Thanks for your help