Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Guys,
I need some help. Actually i have this formula in a chart bar :
=avg(aggr(count({<[Fabricante_Codigo]={'344'}, Data={">$(=Date(addMonths(max(Data),-12)))<=$(=Date(max(Data)))" },Segmento={'Naked Big'} >}[Numero_Chassis]), Mesano))
With this calculated dimension:
=if(Date(Data) >= Date(MonthStart(AddMonths(Today(), -12))), Mesano)
This chart shows me 12 bars, about last 12 months. But, if somebody select a previous month (July, for example), it shows only 1 bar.
I've tried to set '1' in the set analysis, but it didnt worked, nothing change. My field 'Mesano' is the concatenation of :
Month & '-' & Year
The aggr function is to set the correct order of months. If i only use the Count formula, the months stays out of order.
How can i solve this?
Thanks !
Hello Vlad,
Here it goes my problem. The sort need to be by 'MesAno'.
Need to select a previous month and it stays in order.
Thanks!
As you can see, i want a bar chart of last 12 months (based on maxData). I dont want to select all months, just one and the analysis shows automatically.
Need some help.
Thanks Guys
Ah, sorry about that. Change your sort expression to: date#(only({<Mesano>}Mesano),'MMM-YY')
Vlad
Hello Vlad !
It worked, thank you !
How can i sort by Year , Month and MesAno ?
Thank you !
I need this, because the user will generate the report using only Month and Year, but my dimension of bar chart is MesAno. So can you tell me 2 expressions? 1 counting Mesano and other not.
Thanks!
Not sure I understand...it's already sorting by Year-Month.
Yes it is, but it work only if i filter the application using the field Mesano.
If i filter using Month and Year, dont stay in order.
The user need to filter using the fields Month and Year, i dont know why its not working. But if we develop a expression in sort tab, using 2 fields : Year and Month, it will work.
Thanks !
You can test it in the application which i did send.
The field Year is 'Ano' and Month is 'Mes'.
I got it !
The expression is this :
date#(only({<Mes, Ano, Mesano>}Mesano),'MMM-YYYY')
Thank you Vlad !!