Forum Discussion
Anonymous
6 years agoNot applicable
Dynamic Visual based on more than 1 selected value
Hi all, I'm trying to get dynamic measures to work where users can choose 1 option from "Display Value" table and 1 option from "Date Range" table. For example: If "Per TCE" & "YTD" is sele...
- Anonymous6 years ago
managed to get it working using the code below:
Dynamic Options = IF( AND( SELECTEDVALUE('Date Range Option'[Date Range])= "Last Month", SELECTEDVALUE('Aggregation Option'[Display Value]) = "Per TCE" ), [Last Month TCE Price], IF( AND( SELECTEDVALUE('Date Range Option'[Date Range])= "Last Month", SELECTEDVALUE('Aggregation Option'[Display Value]) = "Total Amount" ), [Last Month Revenue NZD], IF( AND( SELECTEDVALUE('Date Range Option'[Date Range])= "YTD", SELECTEDVALUE('Aggregation Option'[Display Value]) = "Total Amount" ), [YTD Sales NZD], IF( AND( SELECTEDVALUE('Date Range Option'[Date Range])= "YTD", SELECTEDVALUE('Aggregation Option'[Display Value]) = "Per TCE" ), [YTD TCE Price], 0 ) )))
Anonymous
6 years agoNot applicable
VijayP Another question, in calculated column why can't I pick the date range table in my formula, like you suggested? Is it because I've no relationship between the two?
Anonymous
6 years agoNot applicable
managed to get it working using the code below:
Dynamic Options =
IF(
AND(
SELECTEDVALUE('Date Range Option'[Date Range])= "Last Month",
SELECTEDVALUE('Aggregation Option'[Display Value]) = "Per TCE"
),
[Last Month TCE Price],
IF(
AND(
SELECTEDVALUE('Date Range Option'[Date Range])= "Last Month",
SELECTEDVALUE('Aggregation Option'[Display Value]) = "Total Amount"
),
[Last Month Revenue NZD],
IF(
AND(
SELECTEDVALUE('Date Range Option'[Date Range])= "YTD",
SELECTEDVALUE('Aggregation Option'[Display Value]) = "Total Amount"
),
[YTD Sales NZD],
IF(
AND(
SELECTEDVALUE('Date Range Option'[Date Range])= "YTD",
SELECTEDVALUE('Aggregation Option'[Display Value]) = "Per TCE"
),
[YTD TCE Price],
0
)
)))- VijayP6 years agoCommunity Champion
Anonymous Hope my idea worked and if you think so, please select my answer as solution and share your Kudos.
Also you can watch my Vidoes at www.youtube.com/perepavijay and visit my LinkedIn Profile
Regards
Vijay Perepa
- Icey6 years agoCommunity Support
Hi Anonymous ,
Glad to hear that this problem has been solved. You may help accept the solution above. Your contribution is highly appreciated.
Best Regards,
Icey