Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello community,
I am trying to give a background color to a table graph, however, it does not work when I specify the period that it should consider for said painting. As you can see in the image, I want to paint the highlighted values. It is worth mentioning that each period is a measure and within the data the period is not considered as a column. Can someone tell me how I could solve it?
Regards & thanks
DC
I'm not sure if it's a typo in the post or in the expression but it needs an additional 'and':
=If([Tiempo.Año]=vMaxAño and [Tiempo.Mes]=1 and [Flag Estacionalidad]=1,RGB(215,215,215))
But if each expression has it's Año and Mes fixed maybe you need:
If(Only({<[Tiempo.Año]={"$(vMaxAño)"},[Tiempo.Mes]={"1"}>} [Flag Estacionalidad])=1,RGB(215,215,215))
Also you can try adding an expression to the table like:
=If([Tiempo.Año]=vMaxAño and [Tiempo.Mes]=1 and [Flag Estacionalidad]=1,1)
So you can check on table rmoving or adding contions to check wich one is failing
And you can add a new table to confirm data, set a table with the 3 dimensions ([Tiempo.Año], [Tiempo.Mes] and [Flag Estacionalidad], and confirm that for max Año and Mes=1 there is only one possible value for [Flag Estacionalidad]
Hi, the question lacks of need information lke the conditions to set the color or the dimesnions used by the rows.
Supposing the date above are a column dimension the syntax could be something like:
If(Match(HorizontalDimension,Values) and Match(VerticalDimension,Values) and ExpressionValues<=>Value, BackgroundColor())
Hello @rubenmarin , the information that is displayed in the header of the columns is not a dimension, it is made up of a measure and I do not have it in another column either, therefore, I wanted to know how to be able to delimit the period without being specifically in the table.
Hi @DanCasSan, if the column header it's not a dimension it means tht each column has it's own expression.
In this case you can set an if condition to check if the selected values should affect that column to color (or not) the background
That's right, each column is an expression, but how would you do such a condition?
Thanks,
DC
How values for periods are selected? and examples of values that can be selected.
Also I will need an example of any of the expressions used in columns
But it will be something like:
If(ColumnDate>=Min(PeriodSelected) and ColumnDate<=Max(PeriodSelected), ColorBackground)
For the period 2022-01 the expression of the column is as follows:
If(vCicloPVO>1,
Sum({<[Tiempo.Año]={"$(vMaxAño)"},[Tiempo.Mes]={"1"},[Versión]={"REAL"},[Negocio.Región]={"NORTE"},
[Negocio.Negocio Comercial]={"CONSUMO MASIVO"},[Cliente.Canal Final]={"TRADICIONAL","OTROS"},[Organización Ventas]={"1510","1560"}>} [Venta TM]),
Sum({<[Tiempo.Año]={"$(vMaxAño)"},[Tiempo.Mes]={"1"},[Versión]={"PVO"},[Negocio.Región]={"NORTE"},
[Negocio.Negocio Comercial]={"CONSUMO MASIVO"},[Cliente.Canal Final]={"TRADICIONAL","OTROS"},[Organización Ventas]={"1510","1560"}>} [Venta TM])
)
The period you display is the name of the column label and for this I use the following expression:
=vMaxAño&'-01'
It should be noted that there are no selection filters for that view.
Regards,
DC
So when you write "it does not work when I specify the period that it should consider for said painting" how do you specify the period? Can you give more details on what is not working?
That's right, when I want to specify a period for each column, it doesn't paint the background anymore.
I have used this expression:
=If([Flag Estacionalidad]=1,RGB(215,215,215))
When I add the year and month it no longer paints:
=If([Tiempo.Año]=vMaxAño and [Tiempo.Mes]=1 [Flag Estacionalidad]=1,RGB(215,215,215))
Regards,
DC
I'm not sure if it's a typo in the post or in the expression but it needs an additional 'and':
=If([Tiempo.Año]=vMaxAño and [Tiempo.Mes]=1 and [Flag Estacionalidad]=1,RGB(215,215,215))
But if each expression has it's Año and Mes fixed maybe you need:
If(Only({<[Tiempo.Año]={"$(vMaxAño)"},[Tiempo.Mes]={"1"}>} [Flag Estacionalidad])=1,RGB(215,215,215))
Also you can try adding an expression to the table like:
=If([Tiempo.Año]=vMaxAño and [Tiempo.Mes]=1 and [Flag Estacionalidad]=1,1)
So you can check on table rmoving or adding contions to check wich one is failing
And you can add a new table to confirm data, set a table with the 3 dimensions ([Tiempo.Año], [Tiempo.Mes] and [Flag Estacionalidad], and confirm that for max Año and Mes=1 there is only one possible value for [Flag Estacionalidad]