Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreShape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.
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 have tried the below code (and max, last date etc etc)
I can not share the actual data as it is sensitive, but I would like to be able to use dynamic names as I want to do this for revenue, sales quantity etc. The values do update and show selected year and last year, but the column name doesn't.
Hi there!
I'm experiencing the same issue and still haven't found a solution.
From my understanding, the example you shared works because, when creating the column, Power BI "knows" the result of the Today() method and "saves" it in the column—meaning it stops being dynamic. I dare to say that it's currently impossible because the problem seems to be that the column name is created before the dashboard context is applied, and they aren't connected. As a result, it can't take dynamic values. It would be an amazing feature if this could work similarly to the "fx" option for titles in objects, for example.
I know my comment doesn’t provide a solution, but I wanted to share why I believe there isn’t an approach today that would work for this. 🙃
Same problem here, we still dont have a solution or even a workarround ?
Nothing yet no unfortunately.
Hi, i am having the same doubt regarding the use of the Function (SELECTEDVALUE) in field parameter.
The below is my Dax Code:
Hello, I've got a similar issue but I haven't been able to find a solution. I created a new post: SELECTEDVALUE doesn't work to add a dynamic header to Field Parameters. Maybe comparing similar problems can help us solve them, let me know.
Olivier.
Olá... Estava com o mesmo problema, consegui resolver criando uma medida da seguinte forma:
Hello... I had the same problem, I managed to solve it by creating a measure as follows:
Name_Title =SELECTCOLUMS('Field Parameter",'Field Parameter'[Field])
As in the filter where the parameter is already configured for single selection, the result of this measure only shows the name of the selected column.
I hope I can help in some way 😃
Hello, I tried to solve this also. I would say I find the answer - it is not possible in this way.
Reason - the parameter table is still a table, it is created with refresh of the dataset. At this point, it is no dynamic anymore. It can use the date, time or alternative result from selectedvalue { SELECTEDVALUE( table[column], alternative) }, but not the selected value itself, as there is any at that moment.
I am also looking for a solution exactly for this case. SELECTEDVALUE returnes nothing when used in Field Parameters. Did you find something @Remmie0 @noverkamp ?
@lbendlin , man you don't need a sample data for this case. Just created a field parameter and put one measure inside. For example, put a measure named as "Net Sales". I assume you would have a YEAR table in your dataset. The idea is to change the measure display name based on a selected year. If you select 2023, the measure name must be "Net Sales 2023" or "Net Sales 2022" based on the selected value. (But only in Field Parameter, no need to provide other workarounds)
Unfortunately not..
Hi,
I have shown the sample output I would like to aquire.
I want gross revenue 2022, gross revenue 2021 if I select year = 2022
I want gross revenue 2021, gross revenue 2020 if I select year = 2021 etc.
I know the functions TODAY() and today - value works, but I want to do it on a selection based.
Can't help without sample data.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.powerbi.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-Forum/ba-...
Please show the expected outcome based on the sample data you provided.
https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523
I've the same problem. Do you already have a solution?
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
Year | Line | EUR |
2022 | A | 10 |
2022 | B | 20 |
2022 | C | 25 |
2023 | A | 14 |
2023 | D | 69 |
2023 | F | 50 |
Fact table:
Dimension Table:
OT_Year =
DISTINCT(
SELECTCOLUMNS(
CALENDAR(
DATE(2022, 1, 1),
TODAY()
),
"Year", FORMAT(year([Date]), "0")
))
Visual:
Dynamic_parameter_field_EUR:
Dynamic_parameter_field_EUR =
VAR selected_year = SELECTEDVALUE(OT_Year[Year])
Return
{
("Year ("&selected_year&")", NAMEOF('Fact'[Measure_EUR]), 0)
}
Ovo je veoma korisno! Puno ti hvala!!
Hi,
I had something similar but look it shows year () and not year (2022) for example. It looks like selected year gets ignored and that was my issue too.
SELECTEDVALUE('Calendar (Posting Date)'[Year])-1 resulted in ' -1'
Kind regards,
Remco
Hi Remco, that's correct.
It shows Year () and not Year (2022)
That's unfortunately my issue, I would love the year to be shown, but as far as I am aware that is not possible to this date.
User | Count |
---|---|
93 | |
90 | |
90 | |
81 | |
49 |
User | Count |
---|---|
156 | |
145 | |
104 | |
72 | |
55 |