Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi Guys,
I am struggling to find a way to get a % of grand total for the various years for the chart below:
Essentially, I want the year totals to work out a % of the grand total for that year. However, when I use the quick measure it is giving me the the percentage of the overall grand total for all the years summed.
How do get the % total per years only without having to filter one year at a time?
Regards,
Reece
Solved! Go to Solution.
Hi @PowerBIReece ,
I have created a simple sample, please refer to my pbix file to see it helps you.
Create a measure.
Measure =
VAR _SUBJECT =
SELECTEDVALUE ( 'Table'[SUBJECT] )
VAR _YEAR =
SELECTEDVALUE ( 'Table'[YEAR] )
VAR _SUMALL =
CALCULATE (
SUM ( 'Table'[VALUE] ),
FILTER ( ALL ( 'Table' ), 'Table'[SUBJECT] = _SUBJECT && 'Table'[YEAR] = _YEAR )
)
VAR _SUMYEAR =
CALCULATE (
SUM ( 'Table'[VALUE] ),
FILTER ( ALL ( 'Table' ), 'Table'[YEAR] = _YEAR )
)
RETURN
_SUMALL / _SUMYEAR
If I have misunderstood your meaning, please provide a simple sample and desired output like I have provided.
How to Get Your Question Answered Quickly
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @PowerBIReece ,
I have created a simple sample, please refer to my pbix file to see it helps you.
Create a measure.
Measure =
VAR _SUBJECT =
SELECTEDVALUE ( 'Table'[SUBJECT] )
VAR _YEAR =
SELECTEDVALUE ( 'Table'[YEAR] )
VAR _SUMALL =
CALCULATE (
SUM ( 'Table'[VALUE] ),
FILTER ( ALL ( 'Table' ), 'Table'[SUBJECT] = _SUBJECT && 'Table'[YEAR] = _YEAR )
)
VAR _SUMYEAR =
CALCULATE (
SUM ( 'Table'[VALUE] ),
FILTER ( ALL ( 'Table' ), 'Table'[YEAR] = _YEAR )
)
RETURN
_SUMALL / _SUMYEAR
If I have misunderstood your meaning, please provide a simple sample and desired output like I have provided.
How to Get Your Question Answered Quickly
Best Regards
Community Support Team _ Polly
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Ritesh,
I have not yet managed to resolve this.
First off, I’d like to apologize for not being able to post my PBIX file because this confidential data I am working with.
I am currently working with survey data, the questions give the respondent a few options in terms of easy, difficult etc and this is what I’m trying to plot below:
The categories are split across the different years.
The issue I’m having is that when I select to reflect values as a % of grand total it gives me the following output:
However, these figures are incorrect, because I am looking for a way to do this across the year, not the entire sample.
So for example this is the same chart filtered by only 2022:
These are the % figures I need to see on the chart above.
Kindly close the thread if the answer was useful or else let us know the challenge.
It will help the community to get to the answer directly
Regards,
Ritesh
Guess you are making use of ALL, please turn that to ALLEXCEPT
It's giving me this:
But I want to see these figures on the combined chart:
User | Count |
---|---|
25 | |
12 | |
8 | |
6 | |
6 |
User | Count |
---|---|
26 | |
12 | |
11 | |
10 | |
6 |