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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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