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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
TomBelgium
Helper I
Helper I

Power BI matrix, add a filtered percentage as column

Hi all,

 

i have a table with invoice info per sector & year which I present in a matrix.
The rows are sector, columns are total per sector in amount and percentage. For percentage, I added a measure 

Procentueel = DIVIDE (
SUM ( PBIInvoice_Info[Total_Invoiced] ),
CALCULATE (
SUM (PBIInvoice_Info[Total_Invoiced] ),
ALL ( PBIInvoice_Info[SectorRFID] )
),
0
)
 
However, I also have a boolean value NewCustomer on which I also want to show a percentage. 
So per row, you get the sector, the total invoiced, percentage total invoiced sector vs total and a percentage of total invoiced sector which is new customer vs total
I don't see how to calculate that last one. 
Any tips, ideas?
1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

Hi @TomBelgium,

Current power bi does not support creating dynamic calculated column/table based on filter selections. They are working on different levels and you can't use the child to affect its parent levels.

Notice: the data level of power bi.

Database(external) -> query table(query, custom function, query parameters) -> data model table(table, calculate column/table) -> data view with virtual tables(measure, visual, filter, slicer)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

Hi @TomBelgium,

Current power bi does not support creating dynamic calculated column/table based on filter selections. They are working on different levels and you can't use the child to affect its parent levels.

Notice: the data level of power bi.

Database(external) -> query table(query, custom function, query parameters) -> data model table(table, calculate column/table) -> data view with virtual tables(measure, visual, filter, slicer)

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
TomBelgium
Helper I
Helper I

Anyone any ideas?

amitchandak
Super User
Super User

@TomBelgium ,

Procentueel = DIVIDE (
CALCULATE (SUM ( PBIInvoice_Info[Total_Invoiced] ), filter(PBIInvoice_Info, PBIInvoice_Info[NewCustomer])),
CALCULATE (
SUM (PBIInvoice_Info[Total_Invoiced] ),
ALL ( PBIInvoice_Info[SectorRFID] )
),
0
)

 

or

 

 

Procentueel = DIVIDE (
CALCULATE (SUM ( PBIInvoice_Info[Total_Invoiced] ), filter(PBIInvoice_Info, PBIInvoice_Info[NewCustomer])),
CALCULATE (
SUM (PBIInvoice_Info[Total_Invoiced] ),
filter(ALL ( PBIInvoice_Info[SectorRFID] ), PBIInvoice_Info[NewCustomer])
),
0
)

Thank you very much. In the matrix, I still don't get the result I am expecting.

 

I have following data

- Project A, 40 K, sector A, status new

- Project B, 40 K sector A, status new

- Project C, 151 K sector A, status old

 

All projects over all sectors are 3,888 K.

 

The percentage of the sector is fine at 6.04%.

However, the percentage  of new projects should be 37% (80 K of 231K) but I can't get that result. I used the three options I am having there (represent as total of column, total of row or total of end result. So I guess I am still doing something wrong.

The result I 

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors