Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
shabarish0587
Contributor
Contributor

How to display MonthYear value based on selected value in straight table

Hi friends,

                  i am facing one issue in straight table i.e. i have a table with mutiple columns. iam giving sample table below:

LOAD * INLINE[

MonthYear,Values

202001,2

202002,5

202003,6

202004,3

202005,6

202006,7

202007,5

];

here my question is if i select value it should display that selected month. for eg: if i select value  is 6  related to monthyear 202005, it should display monthyear 202005 data in table not 202003 data like that i want to display yearmonth based on Value selection. can any one please help me on this.

1 Solution

Accepted Solutions
Anil_Babu_Samineni

May be this?

=If(GetSelectedCount(Values)>1, Aggr(Only({<MonthYear={"$(=Date(Max(MonthYear),'YYYYMM'))"}>} Values), Values))

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

View solution in original post

5 Replies
dmac1971
Creator III
Creator III

If you select 6 then you have to show both 202003 and 202005?

Anil_Babu_Samineni

Perhaps this? But, I wonder why it is needed to select on values which is data point?

If(GetSelectedCount(Values)>1, Sum({<MonthYear={"$(=Date(Max(MonthYear),'YYYYMM'))"}>} Values), Sum(Values))

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
shabarish0587
Contributor
Contributor
Author

HI Dmac,

         I want to show only one selected value Monthyear.

shabarish0587
Contributor
Contributor
Author

HI Anil,

          Thanks for your Reply. is it possible to write this condition on dimension level? because this value is linked with other sheet table. when i click on any value from table1 it will navigate to table2 and displays selected value Monthyear data.

Anil_Babu_Samineni

May be this?

=If(GetSelectedCount(Values)>1, Aggr(Only({<MonthYear={"$(=Date(Max(MonthYear),'YYYYMM'))"}>} Values), Values))

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