Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Syndicate_Admin
Administrator
Administrator

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 3
Syndicate_Admin
Administrator
Administrator

Hello

The problem was in the SQL data source, not in Power BI.

Thanks a lot

v-zhangti
Community Support
Community Support

Hi, @Syndicate_Admin 

 

Can you provide sample data for testing? Sensitive information can be removed in advance. What kind of expected results do you expect? You can also show it with pictures or Excel. I look forward to your response.

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

lbendlin
Super User
Super User

Please provide sample data (with sensitive information removed) that covers your issue or question completely, in a usable format (not as a screenshot). Leave out anything not related to the issue.
If you are unsure how to do that please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.

If you want to get answers faster please refer to https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors