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 moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
Hi Guys.
Using powerbi here I try some crazy ideas but I never find a reference, I search and search and I can't find a solution.
Thank you for your help.
I want the Gauge with reference to a row, but the value comes from a measure. I couldn't use SELECTVALUE for this.
This is because in the model I have in mind, the value of the reference line is not the sum of all results. It's percentage of completion. That is, if you click on another row, the gauge will change, but without any selection, it will keep the reference row.
Thanks
Hi @Peleias ,
When I hide the value of 0.5 using the filter next to it, the total will still be displayed.
If you want the same effect as the measure in Gauge, you can use:
Flag =
IF(
SELECTEDVALUE('Table'[Start]),[Measure_Prg],SUMX(FILTER(ALL('Table'),[Measure_Prg]<>0.5),[Measure_Prg]))
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @v-yangliu-msft , I'm still searching the
forum...
https://community.powerbi.com/t5/Desktop/Default-value-when-no-filter-selected/td-p/1841539
Comments selection =
IF (
ISFILTERED ( CommentsTable[Department] ),
SELECTEDVALUE ( CommentsTable[Comments] ),
CALCULATE (
SELECTEDVALUE ( CommentsTable[Comments] ),
FILTER (
ALL ( CommentsTable[Department], CommentsTable[Comments] ),
CommentsTable[Department] = "Investments"
)
)
)
Basically this is what I would like, but as I said above, my column is a measure.
Selectvalue doesn't work with measure.
Tnks
Sorry @v-yangliu-msft, I think I didn't explain it right.
Follow the pbix similar to what I need. https://drive.google.com/file/d/1k0roPuWq89FOZs95DC-nQHEaLhOOPg_f/view?usp=sharing
Percentages are based on measure with MS Project data, so max value does not apply as some activities reach 100% before the main line.
What do I need; If nothing is selected, the Gauge will show the value of the Internal Services line (in this case, 50%).
In case I hide the Internal Services line later in the table, but the value will remain in the Gauge.
And when I click on the lines, they will be displayed in the Gauge.
Thanks, as each answer helps me with another 10 different things in power bi.
Hi @Peleias ,
According to the design of the power bi engine, in the table, the measure is calculated according to the context, and the value of this measure will definitely have a specified column to calculate it.
So we can select the column corresponding to this measure to perform Selectvalue.
For example, if we want to select measure=50%, we can select the corresponding column [Start]=2022-10-5
I created some data:
Here are the steps you can follow:
1. Create measure.
Measure_Prg =
MAX('Table'[Prg])
Flag =
IF(
SELECTEDVALUE('Table'[Start]),[Measure_Prg],SUMX('Table',[Measure_Prg]))
2. Result:
When selected
When not selected:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
@Peleias I prefer to go with SELECTEDVALUE for this problem. Here is my solution.
For the default value, I have used the MAX value.
Thanks @ghoshabhijeet
I don't think I explained it right either, sorry.
The column is a measurement. And usually the numerical value of the reference line reaches 100% last. Usually several lines reach 100% and finally the reference line reaches 100%.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
89 | |
88 | |
82 | |
64 | |
49 |
User | Count |
---|---|
125 | |
111 | |
88 | |
69 | |
66 |