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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
Deeper
New Member

Percent of a value of a row

Hi all,

 

I have a table and a row containing values ("Blue", "Red", "Green") and dates

I would like to create a graph with Date by month and percent of Blue vs total of values each month

Date      Blue  Total   

jan 2024  10%   50

feb 2024  15%   60   

 

Could you help me ?

 

thanks in advance.

Deeper

1 ACCEPTED SOLUTION
Akash_Varuna
Solution Specialist
Solution Specialist

Hi @Deeper Could you please try these

  1. Create Measures:

    • Total Values:
      TotalValues = SUM(Table[Value])
    • Blue Values:
      BlueValues = CALCULATE(SUM(Table[Value]), Table[Color] = "Blue")
    • Blue Percentage:
      BluePercentage = DIVIDE([BlueValues], [TotalValues], 0)
  2. Add to Graph:

    • Use a Line and Clustered Column Chart.
    • Drag Date to the X-axis, BluePercentage as the Y-axis , and TotalValues as the columns.
  3. Format:

    • Set BluePercentage to percentage format.
    • Adjust the chart to show monthly trends.
      If this post helped please do give a kudos and accept this as a solution
      Thanks In Advance

View solution in original post

2 REPLIES 2
bhanu_gautam
Super User
Super User

@Deeper , Share you actual sample data than DAX can be written for this it will be using divide




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Akash_Varuna
Solution Specialist
Solution Specialist

Hi @Deeper Could you please try these

  1. Create Measures:

    • Total Values:
      TotalValues = SUM(Table[Value])
    • Blue Values:
      BlueValues = CALCULATE(SUM(Table[Value]), Table[Color] = "Blue")
    • Blue Percentage:
      BluePercentage = DIVIDE([BlueValues], [TotalValues], 0)
  2. Add to Graph:

    • Use a Line and Clustered Column Chart.
    • Drag Date to the X-axis, BluePercentage as the Y-axis , and TotalValues as the columns.
  3. Format:

    • Set BluePercentage to percentage format.
    • Adjust the chart to show monthly trends.
      If this post helped please do give a kudos and accept this as a solution
      Thanks In Advance

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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