Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have Line chart which reports official values (Y Axis) based on Reporting year on (x Axis).
Below is the expression for eOfficial
Only({<[CRS Version]=, Flg_National={0}>} [Report Year Percent]).
I have two variables tAxis = 1 Traditional and tAxis =2 for varying. The yaxis in the line chart has to be changed dynamically based on the selection made in the variable
Here is the expression setup for axes but varying is not changing and showing flat line. Could you please help me with the min and max expression for axis and how this vary.
if (
Pick($(tAxis),
$2(Aggr(Only({<[CRS Version]=>} [Report Year Percent]),[Area Name])),
if('$2'='Min', $2(Aggr(
Only({<[Area Name]={'$(=$(vArea_Pick($1)))'},[CRS Version]=>} [Report Year Percent]), [CRS Reporting Year])),
$2(Aggr(
Only({<[Area Name]={'$(=$(vArea_Pick($1)))'},[CRS Version]=>} [Report Year Percent]), [CRS Reporting Year]))))
<0, 0,
Pick($(tAxis),
$2(Aggr(Only({<[CRS Version]=>} [Report Year Percent]),[Area Name])),
if('$2'='Min', $2(Aggr(
Only({<[Area Name]={'$(=$(vArea_Pick($1)))'},[CRS Version]=>} [Report Year Percent]), [CRS Reporting Year])),
$2(Aggr(
Only({<[Area Name]={'$(=$(vArea_Pick($1)))'},[CRS Version]=>} [Report Year Percent]), [CRS Reporting Year])))
))
Try this
=if(
$(tAxis)='Traditional',
Aggr(Only({<[CRS Version]=>} [Report Year Percent]),[Area Name]),
if(
$(tAxis)='Varying',
Aggr(
Only({<[Area Name]={'$(=$(vArea_Pick($1)))'},[CRS Version]=>} [Report Year Percent]),
[CRS Reporting Year]
),
if(
$(tAxis)='Min',
Aggr(
Only({<[Area Name]={'$(=$(vArea_Pick($1)))'},[CRS Version]=>} [Report Year Percent]),
[CRS Reporting Year]
),
if(
$(tAxis)='Max',
Aggr(
Only({<[Area Name]={'$(=$(vArea_Pick($1)))'},[CRS Version]=>} [Report Year Percent]),
[CRS Reporting Year]
),
0 // Default value if none of the conditions match
)
)
)
)
@Aasir wrote:
Try this
=if(
$(tAxis)='Traditional',
Aggr(Only({<[CRS Version]=>} [Report Year Percent]),[Area Name]),
if(
$(tAxis)='Varying',
Aggr(
Only({<[Area Name]={'$(=$(vArea_Pick($1)))'},[CRS Version]=>} [Report Year Percent]),
[CRS Reporting Year]
),
if(
$(tAxis)='Min',
Aggr(
Only({<[Area Name]={'$(=$(vArea_Pick($1)))'},[CRS Version]=>} [Report Year Percent]),
[CRS Reporting Year]
),
if(
$(tAxis)='Max',
Aggr(
Only({<[Area Name]={'$(=$(vArea_Pick($1)))'},[CRS Version]=>} [Report Year Percent]),
[CRS Reporting Year]
),
0 // Default value if none of the conditions match
)
)
)
)
How to pass these values in a variable with parameters in line chart axis?