Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
AndreiOprica
Contributor
Contributor

Grouping results in barchart by end activity

My requirements ask me to build a barchart that groups the results in a barchart by end date activity.

Those activities are dinamyically changing by presssing some buttons.

My dimension is:

 

Monthname([Event Date])

 

and my measure is

 

AVG(
AGGR(
date(max({<[Event Name]={'$(v_End)'}, [Actual Site Event Count]-={0}, CurrMonthfl={1}, Site_KEY-={1}>}[Event Date])) -
date(min({<[Event Name]={'$(v_Start)'}, [Actual Site Event Count]-={0}, CurrMonthfl={1}, Site_KEY-={1}>}[Event Date])),
Site_KEY
)
)

 

For example if I have a row with  01-March-2023 and another row with 01-June 2023 the barchart will create a bar for 'March 2023' as opposed to what I need 'June 2023'. Did anyone do anything simmilar before?

 

 

 

EDIT: I noticed that the barchart is creating abar for whichever is the earliest date I have in my data model:

AndreiOprica_0-1709035452892.png

 

Labels (1)
2 Replies
Anil_Babu_Samineni

@AndreiOprica Do you have sample dataset and expected result?

 

For example if I have a row with  01-March-2023 and another row with 01-June 2023 the barchart will create a bar for 'March 2023' as opposed to what I need 'June 2023'. Did anyone do anything simmilar before?

 


I didn't understand the above bold part, you said that you have records and from that you want to calculate that is maximum, But what based you want to identify the maximum date from row level? 

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
AndreiOprica
Contributor
Contributor
Author

Anil you are right, I phrased this a bit confusing.

For example if I have a start activity on 01-March-2023 and an end activity on 01-June 2023 the barchart will create a bar for 'March 2023' as opposed to what I need 'June 2023'. Did anyone do anything simmilar before?