Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
I have all the results wonderful when I do not filter but as soon as I filter per year (like in the red header table ) something happens. Please advise
this is the DAX that I am using
Completed% =
DIVIDE(
CALCULATE(
COUNTROWS(FILTER('Customer Contact List', NOT(ISBLANK('Customer Contact List'[DateTime])))),
ALL('Customer Contact List'[DateTime].[Year])
),
CALCULATE(
COUNTROWS('Customer Contact List'),
ALL('Customer Contact List'[DateTime].[Year])
)
)
Hi @BeginnerBI
I've got a general idea of your problem, after you filtered the year with a filter, the Cars and Sold columns got equal.
Based on the rendering you want, the Car column should be a sum of values, but it is affected by a filter that only shows the values for the current year.
Use the all(), allselected(), allexcept(), and removefilter() functions to remove unwanted filtering effects.
Here's a blog about contextual filtering, which you can start with the highlights
Understand the Filter Context and How to Control it
Best Regards,
Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi,
I am not sure how your semantic model looks like, or how your DAX measures look like, but I guess ALL DAX function is used in the DAX measures.
In this case or in this scenario, please try using ALLSELECTED DAX function in the measures.
ALLSELECTED function (DAX) - DAX | Microsoft Learn
User | Count |
---|---|
22 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
12 | |
11 | |
7 | |
6 |