cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JayQueue
Frequent Visitor

Percentage measures per year for linechart

Hello,

 

I'm trying to create a linechart like this

 

JayQueue_0-1612431601512.png

We have a total of "Manier van aanvragen" per year.

In 2015 45,74% was "Aantal via brief of mail", 28,76% was "aantal via thuisloket" and 25,50% was "aantal via loket"

2016: 28,70%...

 

I'm struggling with the measures. How do I approach this best?

I counted the rows but how do I count per year? 

 

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @JayQueue ,

 

Sample data is this.

41.png

 

The measures are

a% = DIVIDE(COUNTROWS(FILTER('Table',[Category]="a")),COUNTROWS('Table'))
b% = DIVIDE(COUNTROWS(FILTER('Table',[Category]="b")),COUNTROWS('Table'))

40.png

 

You can check more details from here.

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-stephen-msft
Community Support
Community Support

Hi @JayQueue ,

 

Sample data is this.

41.png

 

The measures are

a% = DIVIDE(COUNTROWS(FILTER('Table',[Category]="a")),COUNTROWS('Table'))
b% = DIVIDE(COUNTROWS(FILTER('Table',[Category]="b")),COUNTROWS('Table'))

40.png

 

You can check more details from here.

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

amitchandak
Super User IV
Super User IV

@JayQueue ,

 

Try a meausre like

divide([measure], calculate([measure], allexcept(Table, Table[year]))



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Thanks @amitchandak 

I'm almost there I think

Now I got this

JayQueue_0-1612433922171.png

But the percentage should be 100% combined as there are only 2 types of "Groep". I can't seem to find why 😕

 

Counting all rows:

Alles = CALCULATE(COUNT('vw_EGOV'[groep]))

 

Counting rows of Groep "Thuisloket"

Thuiswerk = CALCULATE(COUNT('vw_EGOV'[groep]),FILTER(vw_EGOV,vw_EGOV[groep]="Thuisloket"))

 

Counting rows of Groep "Andere"

Andere = CALCULATE(COUNT('vw_EGOV'[groep]),FILTER(vw_EGOV,vw_EGOV[groep]="Andere"))

 

Then I use your measure

count per year Thuisloket = divide([Thuisloket], CALCULATE([Alles], ALLEXCEPT('Date table Datum','Date table Datum'[Year])))
count per year Andere = divide([Andere], CALCULATE([Alles], ALLEXCEPT('Date table Datum','Date table Datum'[Year])))

 

What am I missing here?

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

secondImage

Are You Ready?

Test your skills now with the Cloud Skills Challenge.

Top Solution Authors