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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
Siv_Abu
Frequent Visitor

Insert Calculated Row for SQL Datasource as a Direct Query Matrix

Hi Please some one help me or guide me .

 

How to insert a calculated row for my report.

My datasource comes as a matrix  from Oracle DB Direct Query.

Please help on how do i do it 

I Cannot create index at source level. The datasource is a calling a function in direct query Oracle DB. 

The table from Oracle DB comes into Power BI as a Matrix 

 

2023-06-29.png

 

@amitchandak  @Ritaf1983 @d_gosbell @Ahmedx  @lbendlin  @Ashish_Mathur Hi  could anyone of you guide on this scenario how do we handle this in power bi . Please give tips or guide on how to do this. As am unable to create index column in my Power BI or SQL level for my query . 

4 REPLIES 4
d_gosbell
Super User
Super User

There is no such thing as a calculated row. If you cannot alter the source query or do this in an import model one other option would be to create a composite model with a mapping table that had a m2m relationship with your row_names column and then had data like the following and then use the Group column in your visual.

 

Group Row_Names
Water Water
Soda Soda
Juice Juice
Soda Water Soda
Soda Water Water
Siv_Abu
Frequent Visitor

@lbendlin  I am calling a function from Oracle , which displays the data in the above format. Which looks like a Matrix in Power BI . Like the Above Picture. 

Don't use that function. Instead run your own PL/SQL query in the appropriate format.

lbendlin
Super User
Super User

Please explain what you mean by "Oracle matrix". It would be better to refactor the Oracle query to unpivot the data into a usable format.

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Top Solution Authors