Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Calculate # dimension rows per fact row

Hi,

Probably this is very easy, but for some reason I don't succeed in getting (in the load script) the number of matching dimension rows per fact row.

QVFactDim.png

Example attached as well.

Any advice would be appriciated.

Maarten

1 Solution

Accepted Solutions
Not applicable
Author

In the end I was able to solve the problem with the following code.

QV.png

Did some tests and the results seem to be ok.

Thanks for your feedback.

View solution in original post

4 Replies
Aurelien_Martinez
Partner - Specialist II
Partner - Specialist II

Hi,

See this QV file

Help users find answers! Don't forget to mark a solution that worked for you!
Not applicable
Author

Hi Aurélien,

That would indeed be a good solution if there was no need to calculate the result in the script.

In my case, the best solution would be to have the result as field value.

I can easily solve the problem by using an outer join, but I'm now sure what the impact will be in the real script.

E.g.

QVFactDim2.png

marcus_sommer

I think you could use table-functions like noofrows() for this.

- Marcus

Not applicable
Author

In the end I was able to solve the problem with the following code.

QV.png

Did some tests and the results seem to be ok.

Thanks for your feedback.