result数据表结构示例:
NAME, WK, ID, NUM
ww01, FD, 1, 40
ww01, FD, 3, 30
ww01, HD, 1, 80
ww01, HD, 10, 20
ww02, FD, 1, 50
ww02, FD, 3, 33
ww02, FD, 4, 29
ww02, HD, 1, 85
ww02, HD, 10, 25
ww02, HD, 11, 22
ww02, HD, 12, 19
ww03, FD, 1, 45
ww03, FD, 3, 35
ww03, HD, 1, 90
ww03, HD, 10, 26
ww03, HD, 11, 18
Power BI Desktop中: Page level filter: NAME
Report level filter: NAME
需求:
根据page level filter/report level filter筛选,动态求解出选中的NAME下每一个WK的ID最大值在选中的NAME中的最小值,以及该最小值在不同NAME下对应的NUM值
举例说明:
如果report level filter选中ww01和ww02,则:
Ww01: FD max_ID = 3
HD max_ID = 10
Ww02: FD max_ID =4
HD max_ID = 12
所以选中的NAME的每一个WK的ID最大值的最小值是:
FD min(max_ID) = 3
HD min(max_ID) = 10
最终结果(通过柱状图显示):
该最小值和其所对应的不同NAME下的对应的NUM值为:
Ww01 : FD NUM = 30 , ID = 3
HD NUM = 20 , ID = 10
Ww02: FD NUM = 33, ID = 3
HD NUM = 25, ID = 10