英文:
Dynamic Upper & Lower Bounds in Power BI
问题
我有上限线、下限线和结果线。
我想添加一个动态筛选器,用户可以在0到1之间输入数值,然后上限和下限会移动。我的意思是,我希望上限和下限根据用户输入的值乘以一个百分比来移动。例如,如果上限是100,下限是-50,用户输入0.5,那么上限将变为50,下限将变为-25。
我创建了一个阈值表,其中数值在0到1之间,如下所示:
阈值 = GENERATESERIES(0,1,0.01)
我该如何创建这个筛选器?我不知道如何将阈值表与上限和下限线连接起来。
英文:
I created line chart in power BI like this:
I have Upper line, Lower line and result line.
I want to add dynamic filter that the user can write value between 0 to 1 and then the upper and lower will move. I mean, I want the upper and lower limits to move according to the value that the user entered by multiplying by a percentage. for example, if the upper limit is 100 and the lower limit is -50 and the user entered 0.5 then the upper limit will be 50 and the lower limit will be -25.
I created a Tresh-hold with values between 0to 1 like this:
Tresh-hold = GENRATESERIES(0,1,0.01)
how can I create that filter? I don't know how to connect the Tresh-hold table to the Upper and Lower lines?
答案1
得分: 1
我会展示给您如何处理上限,您可以按照相同的模式处理下限。
阈值表格:
我的数据表格:
这两者之间没有关联。
创建一个单一度量如下:
上限 = MAX(阈值[数值])*100
在报表中添加一个切片器并设置为小于或等于切片器设置中的选项。连接到您的阈值数值,使其看起来像这样。
在您的折线图上,转到分析窗格并添加一个y轴常数线。
对于常数的值,选择fx,然后选择您的度量。
现在切片器与您的折线图的上限边界连接。您可以为下限重复此操作。
英文:
I'll show you how to do the upper and you can follow the same pattern for the lower.
Threshold Table:
My data table:
There are no relationships between the two.
Create a single measure as follows:
Upper = MAX(Threshold[Value])*100
Add a slicer to the report and set to less than or equal to in the slicer settings. Connect to your threshold value so it looks like this.
On your line chart, go to the analytics pane and add a y-axis constant line.
For the value of the constant, select fx and then your measure.
The slicer is now connected to your line chart upper boundary. You can repeat for lower.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论