Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
I need to exclude selections of an master dimension (DueMonth) in the bar chart in Qlik Sense. But, the exclusion is not working as I'm applying exclusion on master dimension. Please let me know how can I fix this?
Master dimension (Duemonth) expression:
if(DueMonth<=(Date(monthstart(addmonths(Today(),6)), 'MMM-YY')),DueMonth)
Measure expression in Bar chart is Sum({<DueMonth=>}sales).
let's try to replace with this expression:
=Aggr( Only( {< DueDate= >} if(DueMonth<=(Date(monthstart(addmonths(Today(),6)), 'MMM-YY')), DueMonth ) ), DueMonth )
and the below as measure:
Sum( {< DueDate= >} Sales )
Let me know.
BR
Hi Manoj,
Kindly explain with example so we can understand your query.
Thanks,
Arvind Patil
let's using the below calculated dimension:
=Aggr( Only( {< DueMonth= >} if(DueMonth<=(Date(monthstart(addmonths(Today(),6)), 'MMM-YY')), DueMonth ) ), DueMonth )
I hope it helps.
Thanks Guys for your response. Sorry for not making this question clear.
lets take an example. I am using inline load as below. I've created a master dimension (Duemonth) and it is being used in the filter and the table. Selections in the filter should not affect Bar chart. so I've added measure (Sum({<DueMonth=>}Sales)) to Bar graph to exclude selections of Duemonth. But it is not working.
//Master dimension to restrict Duemonth only till next 6 months
DueMonth=if(DueDate<=(addmonths(Today(),6)),DueMonth)
Issue:
Load Id,Country,Dept,
Sales,date(DueDate) as DueDate,
(Date(monthstart(DueDate), 'MMM-YY')) as DueMonth
inline
[
Id,Country,Dept,Sales,DueDate
1,US,Sales,10,'18/02/2018'
1,US,IT,20,'28/08/2018'
2,IN,Sales,45,'24/05/2018'
2,IN,HR,35,'18/06/2019'
];
did you try to replace your master dimension with the expression i gave you?
Yes Andrea, But its not working.
let's try to replace with this expression:
=Aggr( Only( {< DueDate= >} if(DueMonth<=(Date(monthstart(addmonths(Today(),6)), 'MMM-YY')), DueMonth ) ), DueMonth )
and the below as measure:
Sum( {< DueDate= >} Sales )
Let me know.
BR
Thanks Andrea. It worked.