not show all data in trend graph chart based on show if condition

hello guys,

i wouldn't show in this graph the value "costo" in "giugno 2022 (June 2022)"  if the current month is the previous (es May 2022).

I would show april, may and not June if, for example, the current month is May

Schermata 2022-06-27 alle 11.15.53.png

It's possibile?

tks guys

Solved Solved
0 9 129
1 ACCEPTED SOLUTION

Please try

NUMBER([Year]&[Month])

View solution in original post

9 REPLIES 9

Could you elaborate exactly what you are looking for? Could you elaborate what you mean by "if the current month is the previous (es May 2022)."

@Suvrutt_Gurjar as a general rule, in the graph I would like the cost line to stop in current month and don't show the subsequent months. 

In this case, imagine that the current month is May 2022, I would like to see in the graph only the months of April and May. Also because as you can see in June the cost is 0

Okay, thank you.  You could try to create a slice on the table with an expression something like

{Month] <= MONTH(TODAY())

Assuming you have a column [Month] for month number.

Basically idea will be to filter out the records of any future months. 

However one thing to note is that in the example you have shared, there are two more graph lines for budget and budget a finire which are not zero in June 2022. How do you wish to manage those two graph lines for June 2022?

@Suvrutt_Gurjar yes, for budget and budget a finire i would like see in the graph also in the next month to the current month.. because i noticed that if i set this condition in slice of course, i don't see also the other two lines for budget and budget a finire.. do you have any idea how can i solve?

Yes, I think eliminating for just one graph line will not be easy. You are basically combining three graph lines and being selective for each graph line may not be possible as the underlying slice will be same.

ok, i have only last problem.. with condition {Month] <= MONTH(TODAY()) i don't see the months of the last year as you can see after giugno 2021 (June) there is Gennaio 2022 (january)

Schermata 2022-06-27 alle 15.56.42.png

I think your filter condition will need to include year as well.

So something like 

[YearMonth]<=   NUMBER(TEXT(TODAY(), "YYMM"))

Where [YearMonth] is a number type column that represents year/month in the format "YYMM".  So June 2022 is represented as 2206 and June 2021 is represented as 2106

@Suvrutt_Gurjar could you tell me the expression for [yearMonth] assuming that i have column [Year] and [Month]

TKS

Please try

NUMBER([Year]&[Month])

Top Labels in this Space