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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Problem showing percentage evolution in histogram bars

Hello, I have a table with 2 rows : accounts numbers plus date of contact.

I added a computed column with YEAR(DateContact).

I've made a visual report (grouped histogram) with the Year as axis, and number of Accounts as sum value.

Everything works fine: it shows the number of accounts grouped by year in several bars.

But I'd like to add (by pop-up) the percentage evolution (in number of accounts) for every bar (every year).

The trouble is that I don't know how to code a measure computing the percentage for every year (from precedent year) in the context of the visual report. I mean showing the specifi percentage for every displayed year.

There is not a global date filter (so I cannot use a DATEADD() function).

Any one has an Idea ? 

Thank you very much if you can help.

2 REPLIES 2
Anonymous
Not applicable

@dedelman_clng 

 

YoY calculation is (Value(T) - Value(T-1)) / Value(T-1).

dedelman_clng
Community Champion
Community Champion

Hi @Anonymous -

 

Is this what you're looking for?

 

YoY Evolution =
VAR __ThisYr =
    SELECTEDVALUE ( Accounts[Year of Contact] )
RETURN
    DIVIDE (
        COUNT ( Accounts[Acct Number] ),
        CALCULATE (
            COUNT ( Accounts[Acct Number] ),
            Accounts[Year of Contact] = __ThisYr - 1
        )
    )

 

2020-11-19 09_11_44-scratch4 - Power BI Desktop.png

If not, please provide sample data and expected results, or a sample pbix file with sensitive data removed.

 

Hope this helps

David

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.