动态上下限在Power BI中

huangapple go评论103阅读模式
英文:

Dynamic Upper & Lower Bounds in Power BI

问题

我在Power BI中创建了折线图,如下所示:
动态上下限在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:
动态上下限在Power BI中

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

我会展示给您如何处理上限,您可以按照相同的模式处理下限。

阈值表格:

动态上下限在Power BI中

我的数据表格:

动态上下限在Power BI中

这两者之间没有关联。

创建一个单一度量如下:

上限 = MAX(阈值[数值])*100

在报表中添加一个切片器并设置为小于或等于切片器设置中的选项。连接到您的阈值数值,使其看起来像这样。

动态上下限在Power BI中

在您的折线图上,转到分析窗格并添加一个y轴常数线。

动态上下限在Power BI中

对于常数的值,选择fx,然后选择您的度量。

现在切片器与您的折线图的上限边界连接。您可以为下限重复此操作。

英文:

I'll show you how to do the upper and you can follow the same pattern for the lower.

Threshold Table:

动态上下限在Power BI中

My data table:

动态上下限在Power BI中

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.

动态上下限在Power BI中

On your line chart, go to the analytics pane and add a y-axis constant line.

动态上下限在Power BI中

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.

huangapple
  • 本文由 发表于 2023年6月15日 23:43:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/76483369.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定