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.
In summary, the question is it possible to force the evualation of a dax measure and is it possible to ignore row context of table visual?
Scenario:
In my powerbi report, I have bunch of slicers, let's call them: slicer_1, slicer_2, slicer_3. Using the filter context of these slicers, I have a measure which returns a single value. The measure is as follows:
min_version =
// calculate percentage errors for the version with minimum absolute percentage error
var tble = SUMMARIZE (
'Volume Analysis',
[slicer_1],
[slicer_2],
[slicer_3],
[slicer_4]
,
"avg_error",
ABS (
DIVIDE (
SUM([Cumulative Actuals]) - sum([Cumulative Forecast]),
SUM([Cumulative Actuals]),
BLANK ()
) * 100
)
)
var version_selected = MAXX(TOPN(1, tble, [avg_error], ASC), [slicer_1])
return
version_selected
Now, I want to use the output of above measure to use as a filter condition for my tabular view and want to use it as a constant and not change it according to the row context of table. For example, if my table is as follows:
Region | Country | Brand | Calculated Value |
Asia | China | b1 | v1 |
Asia | China | b2 | v2 |
Asia | China | b3 | v3 |
Asia | China | b4 | v4 |
And my measure is as follows:
error =
CALCULATE(
ABS(
DIVIDE(
SUM('Volume Analysis'[Cumulative Actuals]) - SUM('Volume Analysis'[Cumulative Forecast]),
SUM('Volume Analysis'[Cumulative Actuals]),
BLANK()
)*100
),
'Volume Analysis'[version] = [version_selected]
)
I wish to calculate the column "Calculated Value" by ignoring the "brand_name" column's effect but taking into account "Region" and "Country" column name. Essentially return the same value irrespective of brand name.
keep in mind that measures cannot influence columns. Have you considered using REMOVEFILTERS() or ALLEXCEPT() ?
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 |
---|---|
47 | |
23 | |
20 | |
15 | |
13 |
User | Count |
---|---|
51 | |
42 | |
39 | |
19 | |
19 |