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
bdehning
Post Prodigy
Post Prodigy

Column Chart Percent Rounding Issue

I use the following measure to compute % of things that occur each day of week for 5 years on a clustered column chart.  Sometimes the % for a year may total 101% for example.   

 

Can I add something to the measure to make sure each year the percentages equal 100%? 

 

Share Count Test =
VAR _count =
    COUNT'LossRunToExcel'[Total Gross Incurred] )
VAR _totalperyear =
    CALCULATE (
        COUNT'LossRunToExcel'[Total Gross Incurred]),
        FILTER (
            ALLSELECTED ( 'LossRunToExcel'),
            [Policy Inception Year] = MAX ( 'LossRunToExcel'[Policy Inception Year])
               
        )
    )
RETURN
    DIVIDE ( _count_totalperyear )
2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Share some data to work with, explain the question and show the expected result.  Please also ensure that you have a Calendar Table with a column of Week number.


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

hi @bdehning 

Not sure about the logic, if limit to result to 100% is the only issue, you may try to change 

RETURN

DIVIDE ( _count, _totalperyear )

to

VAR _pct = 

DIVIDE ( _count, _totalperyear )

RETURN

IF(_pct<=1, _pct, 1)

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.