Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
udian
Helper III
Helper III

All Function Ignored When Using Power BI in Direct Query Mode

Hi All,

 

I am using Power BI in direct query mode to query a tabular cube (the cube was created manually).

 

One of the measures in the cube contains ALL() function in order to ignore user filtering on time dimension.
When i query the cube using Power BI in direct query mode the measure doesn't ignore the user filtering and the measure is filtered on a single month, but when i connect to the tabular cube with excel and preform the same query (same measure and filters) i get the correct result and i can see the measure value for the diferrent months.

 

below you can see the query output from sql profiler for both query methods:

 

Power BI:

 

EVALUATE
TOPN(
501,
CALCULATETABLE(
ADDCOLUMNS(
KEEPFILTERS(
FILTER(
KEEPFILTERS(VALUES('Dim_Transaction_TimeTable'[MonthDate])),
NOT(ISBLANK('Fact_Volume'[First_Loaders_Last_In_6_Months3]))
)
),
"First_Loaders_Last_In_6_Months3", 'Fact_Volume'[First_Loaders_Last_In_6_Months3]
),
KEEPFILTERS(
FILTER(
KEEPFILTERS(VALUES('Dim_Last_6_Months'[MonthDate])),
'Dim_Last_6_Months'[MonthDate] = DATE(2016, 8, 1)
)
)
),
'Dim_Transaction_TimeTable'[MonthDate],
1
)

ORDER BY
'Dim_Transaction_TimeTable'[MonthDate]

 

 

Excel:

 

SELECT NON EMPTY Hierarchize({DrilldownLevel({[Dim_Transaction_TimeTable].[MonthDate].[All]},,,INCLUDE_CALC_MEMBERS)}) DIMENSION PROPERTIES PARENT_UNIQUE_NAME,HIERARCHY_UNIQUE_NAME ON COLUMNS FROM [Model] WHERE ([Dim_Last_6_Months].[MonthDate].&[2016-08-01T00:00:00],[Measures].[First_Loaders_Last_In_6_Months3]) CELL PROPERTIES VALUE, FORMAT_STRING, LANGUAGE, BACK_COLOR, FORE_COLOR, FONT_FLAGS

 

Does anyone know the reason for this strange behaviour or how to solve this?

 

Thanks,

Udi

1 ACCEPTED SOLUTION

@udian

 

I don’t think this is possible in Direct Query Mode. When you select a leading month, the table will always be filtered based on your selection in the slicer, unless you edit interactions to none. But in that case, the table visual will never be filtered. As I said before, the ALL function will ignore the filter from the slicer in the measure calculation, but will not impact the table visual display.

 

I suggest you use one more slicer like Timeline to select the last 12 months and control the rows shown in the table chart.

 

Best Regards,

Herbert

View solution in original post

12 REPLIES 12

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.