Skip to main content
Microsoft Idea

Power BI

New

Query fusion improvements when calculation groups are used

Vote (1) Share
Carola Clasen's profile image

Carola Clasen on 06 May 2023 14:48:23

Improvements to fusion functionality when calculation groups are used

 

I understand that fusion is not working when the measures contain different filters. But I don’t understand why it is not working when using more than one calculation group item in the visual. Only one of the items works perfectly, even an item which is based on two of the other elements works. If the user chooses two or more elements the statements are multiplied = bad performance.

 

One table, four measures, calculation group

Measure1 = calculate(sum(column1), filter1, filter2)

Measure2 = calculate(sum(column2), filter1, filter2)

Measure3 = calculate(sum(column3), filter1, filter2)

Measure4 = calculate(sum(column4), filter1, filter2)

Calculation Group Items:

Cgi1 = selectedmeasure()

Cgi2 = calculate(selectedmeasure(), filter3, filter4)

Cgi3 = cgi1/cgi2

 

Any visual

1.      M1, M2, M3, M4, only Cgi1 --> perfect fusion as expected

Select month, sum(C1), sum(C2), sum(C3), sum(C4) From table Where F1 and F2 Group by month

 

2.      M1, M2, M3, M4, only Cgi2 --> perfect fusion as expected

Select month, sum(C1), sum(C2), sum(C3), sum(C4) From table Where F1 and F2 and F3 and F4 Group by month

 

3.      M1, M2, M3, M4, Cg3 --> perfect fusion as expected, one statement per calculation group item Cg1 and Cg2

Select month, sum(C1), sum(C2), sum(C3), sum(C4) From table Where F1 and F2 Group by month

Select month, sum(C1), sum(C2), sum(C3), sum(C4) From table Where F1 and F2 and F3 and F4 Group by month

 

4.      M1, M2, M3, M4, Cg1, Cg2 --> expected: same statements shown in test3

 

But you get 8 instead of 2 statements:

 

Select month, sum(C1) From table where F1 and F2 group by month

Select month, sum(C2) From table where F1 and F2 group by month

Select month, sum(C3) From table where F1 and F2 group by month

Select month, sum(C4) From table where F1 and F2 group by month

Select month, sum(C1) From table where F1 and F2 and F3 and F4 group by month

Select month, sum(C2) From table where F1 and F2 and F3 and F4 group by month

Select month, sum(C3) From table where F1 and F2 and F3 and F4 group by month

Select month, sum(C4) From table where F1 and F2 and F3 and F4 group by month