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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
July 2024 Power BI Update

Power BI Monthly Update - July 2024

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

July Newsletter

Fabric Community Update - July 2024

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