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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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