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
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
)
)))VijayP
6 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