Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and a 50 percent discount on exams.
Get startedEarn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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() ?