Forum Discussion
Anonymous
3 years agoNot applicable
Dynamic names in field parameters (Selectedvalue)
Hi community, I am trying to get dynamic column names in my tables in a way that it always shows the Gross revenue for the selected year and the year before. I am using a field parameter and I ...
Anonymous
2 years agoNot applicable
Hi, i am having the same doubt regarding the use of the Function (SELECTEDVALUE) in field parameter.
The below is my Dax Code:
test =
VAR selectedyear= SELECTEDVALUE('DATE '[Year])
--VAR slicer= FORMAT((selectedyear),BLANK())
return
{
(selectedyear, NAMEOF('Actuals_Sales Testing'[selected_year]), 0),
(selectedyear-1 , NAMEOF('Actuals_Sales Testing'[selected_year-1 ), 1),
( selectedyear-2, NAMEOF('Actuals_Sales Testing'[selected_year-2]), 2),
(selectedyear-1 vs selectedyear-2 , NAMEOF('Actuals_Sales Testing'[Prev % Diff YOY ]), 3),
(selectedyear vs selectedyear-1, NAMEOF('Actuals_Sales Testing'[Curr % Diff YOY]), 4),
("3 Year CAGR tt", NAMEOF('Actuals_Sales Testing'[3 Year CAGR tt]), 5)
}
The required output:
if 2024 is selected in slicer,test should return like
if 2023 is selected it should return like below
is there any possible way or just give the names as fixed?
The required output:
if 2024 is selected in slicer,test should return like
if 2023 is selected it should return like below
is there any possible way or just give the names as fixed?