Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Qlikkers,
I have a dataset like this-
Now, I want to create a straight table in Qlik Sense that will have Race, CinemaStratum, CinemaPSU as dimensions and sum(UtilityWt) as measure. I want the straight table to look like this-
But I want all the CinemaStratum and CinemaPSU to be included for each of the races. Even if some of the cinemaStratum/cinemaPSU does not have utilityWt, I want 0 to be inserted in that row for the measure i.e. I want to have 10 rows(total no. of PSUs) for each of the races. All I have is the table below which does not include the missing stratums/PSUs.
I am at my wits' end about how to proceed further. I have created an island table but with my little experience of data modeling I can't really connect it to the fact table and compare to include all the values. I don't even know if that's a feasible solution. I would appreciate any help or suggestions.I am really looking forward to hearing from all the experts here! I am attaching my dataset and application(please refer to sheet2) here for reference.
Thank you.
@sunny_talwar , no that's not giving the correct output-
I tried this expression earlier which was giving correct results for two of the rows-
'=if((Dimensionality()=1),
(Sqrt(Sum( {1} Aggr(
((sqr(Sum(UtilityWt) - Sum(Total <CinemaStratum,Gender> UtilityWt)/Count(DISTINCT ALL <CinemaStratum> CinemaPSU))) * (Count(DISTINCT ALL <CinemaStratum> CinemaPSU)/(Count(DISTINCT ALL <CinemaStratum> CinemaPSU)-1)))
, Gender, CinemaStratum, CinemaPSU)))),
Sqrt(Sum( {<Gender>} {1} Aggr(
((sqr(Sum(UtilityWt) - Sum(Total <CinemaStratum,Race,Gender> UtilityWt)/Count(DISTINCT ALL <CinemaStratum> CinemaPSU))) * (Count(DISTINCT ALL <CinemaStratum> CinemaPSU)/(Count(DISTINCT ALL <CinemaStratum> CinemaPSU)-1)))
, Race, Gender, CinemaStratum, CinemaPSU)))
)'