简体   繁体   English

如何使我的 Power BI 表动态地随用户选择的筛选器进行更改?

[英]How do I make my Power BI table dynamic to change with the filters the user selects?

I have a table of calls with a column for phone number and call id.我有一个电话表,其中有一列电话号码和电话号码。 I want to create a visual that shows how many callers called how many times.我想创建一个视觉效果,显示有多少呼叫者调用了多少次。 (eg 5 callers called once, 4 called twice etc.) The challenge I am facing is that once I calculate the count of the number of callers that called count times, the table is static and is not affected by the filters on the report (eg the date filter). (例如 5 个调用者调用了一次,4 个调用者调用了两次等)我面临的挑战是,一旦我计算了调用计数次数的调用者数量的计数,该表为 static 并且不受报告上的过滤器的影响(例如日期过滤器)。

This is what I have done so far.这是我到目前为止所做的。 Is there a better way?有没有更好的办法?

CallerNumber来电号码 CallID来电显示 DateTime约会时间
1 1 a一个 2022-01-01 2022-01-01
1 1 b b 2022-01-01 2022-01-01
2 2 c c 2022-01-02 2022-01-02
3 3 d d 2022-01-03 2022-01-03
4 4 e e 2022-01-01 2022-01-01
4 4 f F 2022-01-05 2022-01-05
4 4 g G 2022-01-06 2022-01-06

From the above original data, I created a table...根据上面的原始数据,我创建了一个表......

Table1 = 
    SUMMARIZE(
        Query,
        Query[CallerNumber],
        "Call Count", COUNT(Query[CallId])
        )
CallerNumber来电号码 Call Count通话次数
1 1 2 2
2 2 1 1
3 3 1 1
4 4 3 3

and then another table from that table which gave me...然后那张桌子上的另一张桌子给了我……

Table2 = 
    SUMMARIZE (
        'Table1',
        'Table1'[Call Count],
        "Number of Callers", COUNTROWS('Table1')
    )
Call Count通话次数 Number of Callers来电人数
1 1 2 2
2 2 1 1
3 3 1 1

How would I instead show the below if someone were interested in calls on Jan1?如果有人对 Jan1 的电话感兴趣,我将如何显示以下内容?

Call Count通话次数 Number of Callers来电人数
1 1 1 1
2 2 1 1

Thanks!谢谢!

CalculatedTable is populated once at powerbi Model refresh, this is why it don't reflect any change in your filters.计算表在 powerbi Model 刷新时填充一次,这就是为什么它不反映过滤器中的任何更改的原因。

A better option is to use a measure:更好的选择是使用度量:

CountOF = CALCULATE( countrows(VALUES('Table'[CallID])))

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM