Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
jazzsran
Partner - Contributor III
Partner - Contributor III

Extra Periods appearing in multiple measures multiple Dimensions in a Combo Chart, Different expression for

Hello All,

I have an urgent requirement

In a Combo Chart with two alternate Dimensions and 3 measures.

For week, we need to show only latest/Current Month and for Month: it shows targets till Next Year End.

For Actuals it is working fine but when I add 'Target' and 'Target%'  measures,  something is not working and making Actuals to show data for extra weeks. Issue is occurring only for 'Week' dimension

Details below:

Dimensions:

       'Year Month' and 'Week'

Measures:

     1. Target:

Pick(Match(GetObjectDimension(),'Year Month','Week'),
Max({$<[_SourceTable]={'Monthly_Target_Table'}>}"Target Monthly"),
Max({$<[_SourceTable]={'Weekly_Target_Table'},YearMonth={'$(=$(vLatestMonth))'}>}"Target Weekly")

2. Actuals:

Pick(Match(GetObjectDimension(),'Year Month','Week'),
Sum({$<[_SourceTable]={'Monthly_Target_Table'}>}"Actuals Monthly"),
Sum({$<[_SourceTable]={'Weekly_Target_Table'},YearMonth={'$(=$(vLatestMonth))'}>}"Actuals Weekly")

3. Target%:

=Pick(Match(GetObjectDimension(),'Year Month','Week'),
(Sum({$<[_SourceTable]={'Monthly_Target_Table'}[Dynamic Option]=,ClaimDataType=>}Std_Units)
/
(Max({$<[_SourceTable]={'Monthly_Target_Table'}[Dynamic Option]=,ClaimDataType=>}[Target Monthly]))),
(Rangesum(above(Sum({$<[_SourceTable]={'Weekly_Target_Table'},[Dynamic Option]=,YearMonth={'$(=$(vLatestMonth))'},
ClaimDataType=>}Units_weekly),0,rowno()))
/
(Max({$<[_SourceTable]={'Weekly_Target_Table'} ,[Dynamic Option]=,YearMonth={'$(=$(vLatestMonth))'},ClaimDataType=>}"Target Weekly")))
)

 

Screenshot for reference:

Data is available only for Target and Actual - I have hidden the data for confidentiality reasons.

Should only show first 3:

jazzsran_1-1695741558690.png

 

jazzsran_0-1695741191362.png

Thanks and Regards

 

Labels (1)
0 Replies