Forum Discussion
All Function Ignored When Using Power BI in Direct Query Mode
- 10 years ago
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
Thanks for the quick reply.
Already tried that before posting...doesn't solve the problem.
I just created a simple measure which using ALL() function in Direct Query Mode, it worked well as below.
Best Regards,
Herbert
- udian10 years ago
Helper III
Hi Herbert,
Appreciate you testing the scenario on your side!
I simplified my measure for simpler testing and it still doesn't work.
This is my test measure:
First_Loaders :=CALCULATE(1000,all(Dim_Last_6_Months))
and this is the result:
As you can see, instead of getting one row for each month with the value 1000 i get only one row for July meaning that the measure ignores the all function.
The month slicer in the image is based on a table containing only 6 records for the last 6 months. The "Last 6 Months" dimesion is connected to the full time dimesion with the MonthDate column (MonthDate = the date of the fisrt day of the month).
Any ideas why it is not working for my measure?
Thanks!
- v-haibl-msft10 years ago
Microsoft Employee
The ALL() function will ignore the filter from the slicer in the measure calculation, but your second table will only return one row because of the slicer selection. This is actually as expected. In my above example, if I remove ALL() in Total_Sales measure, the Total_Sales column values will be same as Sales column because of row context. So the ALL() function is actually working.
Best Regards,
Herbert
- udian10 years ago
Helper III
Hi Herbert,
Thank you for the explanation!
So assuming that the MonthDate in the rows of the table visual is taken form the full time dimension, is there any way to display all months regardless to the selection in the Last_6_Months dimesion?
My final goal is to slice some of the visuals in my report with the chosen month from the Last_6_Months slicer while is some of the other visuals i wish to display all months prior to the chosen month.
Thanks!