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

Calculating line graph for all possible values of a dimension

I have the following measure in a line graph where my dimension is M1. However the graph only shows values when M1 is selected, and i'd like the graph to show values for every value in M1. Below the formula is a table with some example data about the values in M1.

(

Sum({$<M={$(=MFe)}>}np*fe_m)

+

Sum({$<M={$(=MFeAnt)}>}np*fe_m_ant)

+

Sum({$<M={$(=MFeAnt2)}>}np*fe_m_ant2)

)

/

(

Sum({$<M={$(=MFe)}>}fe_m)

+

Sum({$<M={$(=MFeAnt)}>}fe_m_ant)

+

Sum({$<M={$(=MFeAnt2)}>}fe_m_ant2)

)

MM1MFeMFeAntMFeAnt2
13321
23321
33321
24432
34432
44432
1 Solution

Accepted Solutions
sunny_talwar

May be try using if statement instead of set analysis

(

Sum(If(M=MFe, np*fe_m))

+

Sum(If(M=MFeAnt, np*fe_m_ant))

+

Sum(If(M=MFeAnt2, np*fe_m_ant2))

)

/

(

Sum(If(M=MFe, fe_m))

+

Sum(If(M=MFeAnt, fe_m_ant))

+

Sum(If(M=MFeAnt2, fe_m_ant2))

)

View solution in original post

2 Replies
sunny_talwar

May be try using if statement instead of set analysis

(

Sum(If(M=MFe, np*fe_m))

+

Sum(If(M=MFeAnt, np*fe_m_ant))

+

Sum(If(M=MFeAnt2, np*fe_m_ant2))

)

/

(

Sum(If(M=MFe, fe_m))

+

Sum(If(M=MFeAnt, fe_m_ant))

+

Sum(If(M=MFeAnt2, fe_m_ant2))

)

Anonymous
Not applicable
Author

Thanks, works perfectly.