Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
nat99
Contributor
Contributor

How to calculate average value among different fields

Hi everyone, 

I have a fact table look like this for example:

Equipment Component #1 Component #2 Hours  Other fields...
E1 C1 C2 10  
E2 C1   5  
E3 C2 C4 4  
E4 C3 C4 2  
E5 C3   1  

 

I would like the output (either as a dataset in a datamodel or the visualization ) as average hours per each component. And for the equipment like E1 which has two different components, it should be 10/2 = 5 hours for each C1 and C2 component. 

I'm new to QlikSense so I'm not really sure how to proceed in this, note that I would like not to have additional rows in the fact table above as it affects to the meaning of the data behind.

Desired output may look like this: 

Component Average Hours
C1  

C2

 
C3  
C4  
C5  

 

Any comments and ideas are highly appreciated. Thank you

Labels (4)
1 Solution

Accepted Solutions
eronevil
Creator
Creator

Hello,

You can make desired output table in front end. Add table visualization Component as dimension and Hours as measure and select Avg

 

-V

View solution in original post

1 Reply
eronevil
Creator
Creator

Hello,

You can make desired output table in front end. Add table visualization Component as dimension and Hours as measure and select Avg

 

-V