Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 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?
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?