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.
Hello.
My problem is that i want to show the total average of an averagex function for all the rows, as i can to use it with color formatting (as a benchmark) - but I cant seem to figure it out.
I've tried using the following code:
Total average on rows =
var _result =
calculate ( averagex (Values( 'Dim - Date'[W+"WeekNo"]), [measure)] ) ,
FILTER('Dim - Date', [IsLast12Weeks] = "Yes" ), ALL('Dim - Date'[W+"WeekNo"] ) )
return
_result
My [measure] is a simple count. In the following picture you can see that the Total of the averagex code is the number i want, but on every week (row), so i can compare it to the measure, and color format it.
I hope somebody can help.
Solved! Go to Solution.
Hi, @Anonymous
According to your description, I guess you want to make the [Total average on rows] display the same amount for each row, which is the average for all weeks, and compare with the [measure], and compare the value with [Measure] then color format it, you can try this measure:
Total average on rows =
calculate ( average ( [measure] ) ,
FILTER(ALL('Dim - Date'), [IsLast12Weeks] = "Yes" ) )
To color format the [Measure], you can follow my step:
Color =
IF([Total average on rows]>=[Measure],"GREEN","RED")
And you can get the table like this:
You can download my test pbix file here
More info about Conditional formatting of table chart
If this DAX can not achieve your expected result, you can post some sample data(without sensitive data) and your expected result, so that we can help you in advance. Thanks very much!
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi, @Anonymous
According to your description, I guess you want to make the [Total average on rows] display the same amount for each row, which is the average for all weeks, and compare with the [measure], and compare the value with [Measure] then color format it, you can try this measure:
Total average on rows =
calculate ( average ( [measure] ) ,
FILTER(ALL('Dim - Date'), [IsLast12Weeks] = "Yes" ) )
To color format the [Measure], you can follow my step:
Color =
IF([Total average on rows]>=[Measure],"GREEN","RED")
And you can get the table like this:
You can download my test pbix file here
More info about Conditional formatting of table chart
If this DAX can not achieve your expected result, you can post some sample data(without sensitive data) and your expected result, so that we can help you in advance. Thanks very much!
How to Get Your Question Answered Quickly
Best Regards,
Community Support Team _Robert Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
112 | |
99 | |
73 | |
72 | |
49 |
User | Count |
---|---|
145 | |
109 | |
108 | |
90 | |
64 |