Forum Discussion
FILTERED Measure not working in a graph
Hello
I have this measure but it does not seem to work, it only displays the max of the various Legend entries in a line chart:
Measure =
AVERAGEX(
KEEPFILTERS(VALUES('A'[Date(bins)])),
DIVIDE(CALCULATE(AVERAGE('A'[Value]))),CALCULATE(AVERAGE('A'[Value]),FILTER(VALUES(A),A[Type]="Type1")))
)
Do you know what could be wrong?
Thanks!
4 Replies
- VahidDM
Super User
Hi Anonymous
Can you post sample data as text and expected output?
Not enough information to go on;
please see this post regarding How to Get Your Question Answered Quickly:
https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490
The most important parts are:
1. Sample data as text, use the table tool in the editing bar
2. Expected output from sample data
3. Explanation in words of how to get from 1. to 2.
4. Relation between your tables
Appreciate your Kudos!!
LinkedIn:www.linkedin.com/in/vahid-dm/ - v-luwang-msft
Community Support
Hi Anonymous ,
Could you pls share your sample data and expect output?Remember to remove confidential data.
And you could test the below:
TEST = AVERAGEX ( KEEPFILTERS ( VALUES ( 'A'[Date(bins)] ) ), DIVIDE ( CALCULATE ( AVERAGE ( 'A'[Value] ) ), CALCULATE ( AVERAGE ( 'A'[Value] ), FILTER ( 'A', A[Type] = "Type1" ) ) ) )or
TEST = AVERAGEX ( KEEPFILTERS ( VALUES ( 'A'[Date(bins)] ) ), DIVIDE ( CALCULATE ( AVERAGE ( 'A'[Value] ) ), CALCULATE ( AVERAGE ( 'A'[Value] ), FILTER (all('A'), A[Type] = "Type1" ) ) ) )Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
- v-luwang-msft
Community Support
Hi Anonymous ,
Has your problem been solved, if so, please consider Accept a correct reply as the solution or share your own solution to help others find it.
Best Regards
Lucien