Forum Discussion

Syndicate_Admin's avatar
Syndicate_Admin
Administrator
2 years ago

How to edit this query

Hello

I have a matrix that I prepared using some measurements that I don't see anywhere, the Values appear in the array, but now I'm not able to edit them to modify. Here's an example I saved in the notepad.

I take the value of a measure and add the amounts when they meet a certain condition, to configure the list with the different headings that make up the list.

How can I locate and edit them?

Ac Real_R =
SWITCH(
[SelectR],
"A REVENUE", CALCULATE([Actual AC], V_PBI[Abstract] = "RevenueR"),
"B DIRECT EXPENSES", CALCULATE([Actual Ac], V_PBI[Abstract] = "GtosDirectosR"),
"C GROSS MARGIN",
CALCULATE(
SUMX(
FILTER(
V_PBI,
V_PBI[Abstract] = "R-Revenue" || V_PBI[Abstract] = "GtosDirectosR"
),
[AC Real]
)
),
"D COMMISSIONS", CALCULATE([Ac Real], V_PBI[Abstract] = "CommissionsR"),
"E TOTAL GROSS COMMERCIAL MARGIN",
CALCULATE(
[Ac Real],
(V_PBI[Abstract] = "R-Revenue") || (V_PBI[Abstract] = "GtosDirectosR") || (V_PBI[Abstract] = "R-Commissions")
),
"F TOTAL INDIRECT PRODUCT EXPENSES",CALCULATE([Actual Ac], V_PBI[Abstract] = "IndirectR"),
"G NET PRODUCT MARGIN",
CALCULATE(
[Ac Real],
(V_PBI[Abstract] = "R-Revenue") || (V_PBI[Abstract] = "GtosDirectosR") || (V_PBI[Abstract] = "R-Commissions") || (V_PBI[Abstract] = "GtosIndirectR")
),
"H ORDINARY OVERHEADS", CALCULATE([Ac Real], V_PBI[Abstract] = "GtosGralOrdR"),
"I CONTROLLABLE CONTRIBUTION",

3 Replies