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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
tbobolz
Resolver I
Resolver I

Is a child "level" percentage on a matrix row possible?

9f7e32c1-c5e2-4fd1-8ea0-cddf3a2cdd2e.jpg

 

I've used the "Percent of Row Total", on "Show value as" option of a Value in a matrix. This function is at the parent row level, so when I have two years compared side by side on the columns, it calculates the percentage of rows across all values and i need it to break at each year, to show a year over year change. This way each year will total to each year and not the entire row.

 

Is this possible?

 

Thanks for your advice.

 

 

 

2 ACCEPTED SOLUTIONS
Ashish_Mathur
Super User
Super User

Hi,

This measure pattern should help

Measure = [revenue]/calculate([revenue],all(Data[Types]))

If it does not help, then share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

v-rzhou-msft
Community Support
Community Support

Hi @tbobolz ,

 

I suggest you to try code as below to create a measure.

Percentage =
VAR _VALUE =
    CALCULATE ( SUM ( 'TableName'[Value] ) )
VAR _TOTALBYYEAR =
    CALCULATE (
        SUM ( 'TableName'[Value] ),
        ALLEXCEPT ( 'TableName', 'TableName'[Year] )
    )
RETURN
    DIVIDE ( _VALUE, _TOTALBYYEAR )

 

Best Regards,
Rico Zhou

 

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

 

View solution in original post

3 REPLIES 3
v-rzhou-msft
Community Support
Community Support

Hi @tbobolz ,

 

I suggest you to try code as below to create a measure.

Percentage =
VAR _VALUE =
    CALCULATE ( SUM ( 'TableName'[Value] ) )
VAR _TOTALBYYEAR =
    CALCULATE (
        SUM ( 'TableName'[Value] ),
        ALLEXCEPT ( 'TableName', 'TableName'[Year] )
    )
RETURN
    DIVIDE ( _VALUE, _TOTALBYYEAR )

 

Best Regards,
Rico Zhou

 

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

 

Ashish_Mathur
Super User
Super User

Hi,

This measure pattern should help

Measure = [revenue]/calculate([revenue],all(Data[Types]))

If it does not help, then share the download link of the PBI file.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

yes, you have full control over what to show in the cells, row totals, column totals and grand totals.  You can use ISINSCOPE to figure out where you are.

 

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.
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.

https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

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