Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hello,
In my measure, I have created a Virtual Table using VAR statement. This virtual table uses ALLSELECTED to summarize all the columns available in the current visual along with two measures that are in the model already. In the second part of thismeasure, I would like to sum Column "A" of the virtual table I created with a filter (based on the current filter context of the matrix). However, when I try to add a SUM function for example, Column A does not even appear as an option.
I have provided my first part of the measure which is a Virtual table. Struggling with the second part where I want to sum Column A based on the current filter context of the visual. Any suggestions on how to write second VAR part where it sums up Column A only for the current filter context? Thanks
VAR INTERNAL_TABLE =
CALCULATETABLE(ADDCOLUMNS (
(SUMMARIZE(
FACTTABLE,FACTTABLE[REGION],FACTTABLE[CUSTOMER])
"A", [MEASURE 1]
"B”, [MEASURE 2]
),ALLSELECTED())
Hi @Alf94 Thanks for your response.
Unfortunately, it is not working as the SUMX iteration is adding up the entire Calculated Table which is using ALLSELECTED.
I need to find a way to use current filter context before SUMX conducts its operation of the calculated table. Thanks
Hi @daxreport ,
Can you please try the following?
Measure =
SUMX(
CALCULATETABLE(
ADDCOLUMNS (
SUMMARIZE(
FACTTABLE,
FACTTABLE[REGION],
FACTTABLE[CUSTOMER]
)
"A", [MEASURE 1]
"B”, [MEASURE 2]
),
ALLSELECTED()
),
[A]
)
If I answered your question, please mark my post as a solution.
Best,
User | Count |
---|---|
12 | |
11 | |
8 | |
6 | |
6 |
User | Count |
---|---|
25 | |
19 | |
14 | |
10 | |
7 |