Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I have a column 'hours' that needs to be fild with a unique value .i.e. '18' for all records, regardless the other columns.
So every record needs to be 18
And with a slicer i want to change this value from 0 to 23
I have searched on the internet and forums and looked at powerQuery examples or just create columns in the model to internet but there is no simple solutions. Does anyone have a solution for this?
In my dataset i made a new column (as you suggested) named test = [Selected_value], default = 0;
The result is that only the default is shown, and using the slicer value stays 0
You misunderstood my solution. In Step 1 I said "Create a new Table" NOT a new Column. The whole example will add the value in a table visual, not in your dataset.
In other words, with my solution you create a selectable measure that you add to a visual Table or a Table matrix together with column from your dataset.
I hope it makes sense now.
I'm sorry I explained this not good enough. I did made a table:
Then: measure:
Then:
on the data-table where I need the column I add this column based on the measure:
I hope I explained it right?
We are spinning in circles 🙂 Your screenshot with the table is from your Table view and my solution is applicable in the Report view (see the attached screenshots).
Ahhh well then this solution is not applicable for me. I want to add a column in the table and not in the report. I have already made a parameter (see already send picture second column on the right 'uurselectie'). But the thing is that in Tableau you can use a parameter as a column in the table and change it via a selection, in powerBI you can add the parametervalue in the table, but here you can not change the parameter value via een slicer/ selection in the view.
Many thanks for you time I appreciate this
I think Tableau is mixing things up a bit. In PowerBI you do the selection at Report level not at dataset level (or at least not that I'm aware of).
Cheers
I did what you described:
The selected value indeed changes, but the column test in my source table stays at the number I programmed in step 2 (in my case 1); Am I missing something?
What do you use for the test column? You must use a column from your dataset; in the example I made, the AccountID column is from my dataset, it is not an intermediate step.
Hi,
You can try the following:
Step 1. Create a new Table and generate the desired series.
ex: Value Selector = GENERATESERIES(0,23,1) - this will generate a series from 0 to 23 with increments of 1
Step 2. Read the selected value with the below measure:
Selected_Value =SELECTEDVALUE('Value selector'[Value],18) - this will read the Step 1 value BUT if nothing is selected it will return 18
Step 3. Make the Value selector a Tile or Drop-down Slicer
Step 4. Add the new measure to any table you want see the 2 screenshots
PS: if it solved your problem please mark it as the solution, this may help others looking for the same thing
User | Count |
---|---|
73 | |
69 | |
36 | |
25 | |
22 |
User | Count |
---|---|
96 | |
94 | |
53 | |
45 | |
39 |