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.
Hi,
I am looking to get the average of a column which was calculated with SUMX. If get that it's not working because dax doesn't know the context, however I can't seem to figure this out.
Example:
test = SUMX(table1, table1[c1] - table1[2])
and then I want IF test > 0 -> take into account to average.
Solved! Go to Solution.
Hi @fisqkuz1
You can try this measure
AVG = AVERAGEX(FILTER('Table1','Table1'[C1]-'Table1'[C2]>0),'Table1'[C1]-'Table1'[C2])
Below is my sample data and measure result.
If this is not what you want, can you provide some sample data and expected result so that we can try to come up with a more accurate solution?
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
Hi @fisqkuz1
You can try this measure
AVG = AVERAGEX(FILTER('Table1','Table1'[C1]-'Table1'[C2]>0),'Table1'[C1]-'Table1'[C2])
Below is my sample data and measure result.
If this is not what you want, can you provide some sample data and expected result so that we can try to come up with a more accurate solution?
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
12 | |
10 | |
6 |